squiggles
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Let your agent see the squiggles you'd see in an IDE.
squiggles is an MCP server that bridges coding agents to Language Server Protocol (LSP) servers. Configure one or more LSP servers and squiggles exposes their features — diagnostics, go-to-definition, find references, rename, formatting, and more — as MCP tools. Servers start lazily on first tool use, so there's no startup cost for languages you don't touch.
Beyond the standard protocol, squiggles unlocks the custom superpowers each language server ships that editors rarely surface and agents otherwise never see: expanding a Rust macro, discovering Ruby tests, switching between a C++ source file and its header, fixing every import after moving a TypeScript file, running govulncheck through gopls.
Quick Start
Then, in your project root:
This writes a squiggles.yaml for the languages it finds (a tsconfig.json means TypeScript, a Cargo.toml means Rust, and so on). Name the servers to choose them yourself: npx squiggles init typescript ruby. Presets exist for typescript, rust, ruby, go, python, cpp and lua; each needs its language server on PATH, and init prints the install command for every one it writes.
The result for a TypeScript project:
Configuration
squiggles looks for squiggles.yaml, squiggles.yml, .squiggles.yaml, or .squiggles.yml in the project root (the old mclsp.yaml names still work). Each server entry supports:
| Field | Required | Description |
|---|---|---|
| command | Yes | Command to start the LSP server (string array) |
| filePatterns | Yes | Glob patterns for files this server handles |
| initializationOptions | No | Options passed to the LSP server on initialization |
| rootUri | No | Override the workspace root URI |
| env | No | Environment variables for the LSP server process |
Multiple servers can be configured for different languages:
Tools
All standard LSP tools are registered and available when a matching server is configured.
**Navigation:** goto_definition, goto_type_definition, goto_implementation, goto_declaration, find_references
**Inspection:** hover, signature_help, document_symbols, workspace_symbols
**Refactoring:** code_actions, rename_prepare, rename, format
**Hierarchy:** call_hierarchy_incoming, call_hierarchy_outgoing, type_hierarchy
**Always available:** open_file, diagnostics
Position-based tools take file (relative path), line (1-indexed), and col (1-indexed). rename accepts apply: true to write the edit to disk instead of returning it; format always writes to disk. code_actions automatically passes the diagnostics overlapping the requested range, so quick fixes show up.
Server Extensions
The best language servers go far beyond the standard protocol, and this is where squiggles earns its keep: it subscribes to the custom methods and commands that IDE plugins use but agent harnesses ignore. Extension tools register automatically when a matching server is configured.
**Ruby (ruby-lsp)**
| Tool | What it does |
|---|---|
| ruby_discover_tests | Discover test cases (Minitest, RSpec) in a file |
| ruby_go_to_relevant_file | Jump between implementation and test file |
| ruby_show_syntax_tree | Show the Prism AST for a file |