connector
by OpticLM·★ 3·Score 36
Abstract interface for LLMs to connect to code analysis tools via MCP and AI SDK implementations.
Overview
The @opticlm/connector provides an abstract interface that allows LLMs to connect to various fact sources including LSPs, code diagnostics, symbol definitions/references, links, and frontmatter. It offers both MCP and Vercel AI SDK implementations with comprehensive tool coverage for code analysis, navigation, editing, diagnostics, and document linking. The library features a modular provider-based architecture allowing IDEs to implement only the functionality they support.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this connector when you need to integrate LLM capabilities with IDE environments that support LSP, particularly for code navigation, diagnostics, and editing features.
When NOT to choose this
Avoid this if you need a general-purpose MCP server for non-code-related tasks or if you're looking for a solution with broader language support beyond what LSP provides.
Tools this server exposes
12 tools extracted from the READMEgoto_definitionNavigate to the definition of a symbol.
find_referencesFind all references to a symbol.
find_file_referencesFind all references to a file across the workspace.
call_hierarchyGet call hierarchy for a function or method.
apply_editApply a text edit to a file using hashline references.
global_findSearch for text across the entire workspace.
get_link_structureGet all links in the workspace, showing relationships between documents.
add_linkAdd a link to a document by finding a text pattern and replacing it with a link.
get_frontmatter_structureGet frontmatter property values across documents.
set_frontmatterSet a frontmatter property on a document.
get_diagnosticsGet diagnostics (errors, warnings) for a specific file.
get_outlineGet document symbols (outline) for a file.
Comparable tools
Installation
npm install @opticlm/connectorFor Claude Desktop, add to claude_desktop_config.json:
{
"mcpServers": {
"opticlm-connector": {
"command": "npx",
"args": ["@opticlm/connector"]
}
}
}FAQ
- What file formats does the connector support?
- The connector primarily works with source code files and supports reading files in hashline format to enable safe editing operations.
- How does it handle LSP integration?
- It abstracts LSP functionality through providers for definitions, references, diagnostics, outlines, and more, allowing seamless integration with any LSP-compatible language server.
Compare connector with
Last updated · Auto-generated from public README + GitHub signals.