mcp服务器代码图
A. 模型上下文协议 服务器,提供在代码库中生成和查询图形表示的工具。
特性
- 📊 创建代码库的图形表示
- 🔍 标识实体(函数、类、导入)及其关系
- 🔗 跟踪函数调用、继承和实现等关系
- 🌐 支持多种编程语言(Python、JavaScript、Rust)
工具
- 索引
- 对代码库进行索引,以创建实体和关系图。
- list_file_entities
- 提供指定文件中所有实体的列表。 - path (string):文件的相对路径
- list_entity_relations
- 列出特定实体的关系 - 输入 - path (string):文件的相对路径 - name (string):实体名称
用法
npx @cartographai/mcp-server-codegraph /path/to/directory克劳德桌面
将此添加到您的 claude_desktop_config.json
{
"mcpServers": {
"codegraph": {
"command": "npx",
"args": [
"-y",
"@cartographai/mcp-server-codegraph",
"/path/to/directory",
]
}
}
}