MCP Catalogs
首页

connector

by OpticLM·3·综合分 36

为 LLM 提供通过 MCP 和 AI SDK 实现连接代码分析工具的抽象接口

developer-toolsai-llmfile-system
1
Forks
0
活跃 Issue
1 个月前
最近提交
24 天前
收录于

概述

@opticlm/connector 提供抽象接口,让 LLM 能够连接到各种事实源,包括 LSP、代码诊断、符号定义/引用、链接和 frontmatter。它同时提供 MCP 和 Vercel AI SDK 实现,全面覆盖代码分析、导航、编辑、诊断和文档链接等功能。该库采用基于提供程序的模块化架构,使 IDE 只需实现其支持的功能。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:使 AI 助手能够在具有 LSP 集成的 IDE 中导航和分析代码
:通过 AI 工具调用实现智能代码补全和重构
:访问代码结构和诊断信息,创建 AI 驱动的文档生成
:连接器支持哪些文件格式?
:它如何处理 LSP 集成?

什么时候选它

当您需要将 LLM 功能与支持 LSP 的 IDE 环境集成,特别是用于代码导航、诊断和编辑功能时,选择此连接器。

什么时候不要选它

如果您需要用于非代码相关任务的通用 MCP 服务器,或者寻找超出 LSP 提供的语言支持的解决方案,请避免使用此工具。

此 server 暴露的工具

从 README 抽取出 12 个工具
  • goto_definition

    Navigate to the definition of a symbol.

  • find_references

    Find all references to a symbol.

  • find_file_references

    Find all references to a file across the workspace.

  • call_hierarchy

    Get call hierarchy for a function or method.

  • apply_edit

    Apply a text edit to a file using hashline references.

  • global_find

    Search for text across the entire workspace.

  • get_link_structure

    Get all links in the workspace, showing relationships between documents.

  • add_link

    Add a link to a document by finding a text pattern and replacing it with a link.

  • get_frontmatter_structure

    Get frontmatter property values across documents.

  • set_frontmatter

    Set a frontmatter property on a document.

  • get_diagnostics

    Get diagnostics (errors, warnings) for a specific file.

  • get_outline

    Get document symbols (outline) for a file.

可对比工具

mcp-xtermmcp-filesystemmcp-shell

安装

npm install @opticlm/connector

对于 Claude Desktop,添加到 claude_desktop_config.json

{
  "mcpServers": {
    "opticlm-connector": {
      "command": "npx",
      "args": ["@opticlm/connector"]
    }
  }
}

FAQ

连接器支持哪些文件格式?
连接器主要处理源代码文件,支持以 hashline 格式读取文件以实现安全的编辑操作。
它如何处理 LSP 集成?
它通过提供程序(providers)抽象 LSP 功能,包括定义、引用、诊断、大纲等,可无缝集成任何与 LSP 兼容的语言服务器。

connector 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。