一款生产就绪的TypeScript MCP服务器,提供全面的项目分析、智能搜索、多文件编辑和依赖关系映射功能。
无需安装! 只需在您的MCP客户端中添加以下配置:
{
"mcpServers": {
"context-engine": {
"command": "npx",
"args": ["-y", "context-engine-mcp"]
}
}
}
全局安装:
npm install -g context-engine-mcp
配置您的MCP客户端:
{
"mcpServers": {
"context-engine": {
"command": "context-engine-mcp"
}
}
}
克隆并构建:
git clone https://github.com/RaheesAhmed/Context-Engine-MCP-Server.git
cd Context-Engine-MCP-Server
npm install
npm run build
使用本地路径配置:
{
"mcpServers": {
"context-engine": {
"command": "node",
"args": ["./dist/index.js"]
}
}
}
添加到:C:\Users\{USERNAME}\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
添加到:%APPDATA%\Claude\claude_desktop_config.json
使用上述所示的相同配置格式。
| 工具 | 描述 |
|---|---|
analyze_project | 带缓存的全面项目分析 |
search_project | 跨项目文件的智能搜索 |
edit_multiple_files | 带备份的原子多文件编辑 |
get_file_relationships | 文件依赖关系和导入/导出映射 |
get_project_stats | 详细项目度量指标和健康洞察 |
clear_cache | 清除所有缓存的项目数据 |
| 资源 | URI | 描述 |
|---|---|---|
| 项目分析 | context://project-analysis | 项目结构和上下文数据 |
| 搜索结果 | context://search-results | 智能搜索能力 |
| 文件关系 | context://file-relationships | 依赖关系映射信息 |
| 项目统计 | context://project-stats | 健康度量指标和洞察 |
// 工具: analyze_project
{
"projectPath": "/path/to/your/project",
"forceRefresh": false
}
// 工具: search_project
{
"projectPath": "/path/to/your/project",
"query": "function.*Component",
"caseSensitive": false,
"includeStructure": true
}
// 工具: edit_multiple_files
{
"projectPath": "/path/to/your/project",
"changes": [
{
"filePath": "src/components/Header.tsx",
"action": "update",
"content": "// 更新后的组件代码",
"backup": true
},
{
"filePath": "src/types/index.ts",
"action": "create",
"content": "export interface NewType {}"
}
]
}
该服务器包括智能默认设置,并可通过环境变量进行配置:
LOG_LEVEL: 设置日志级别(debug, info, warn, error)CACHE_TTL: 缓存生存时间(毫秒)MAX_FILE_SIZE: 分析的最大文件大小(字节)git clone https://github.com/RaheesAhmed/Context-Engine-MCP-Server.git
cd Context-Engine-M
npm install
npm run build # 构建项目
npm run dev # 开发模式,带监视
npm run test # 运行测试
npm run test:coverage # 运行带有覆盖率的测试
npm run lint # 运行ESLint
npm run format # 使用Prettier格式化
# 运行所有测试
npm test
# 带有覆盖率的测试
npm run test:coverage
# 监视模式
npm run test:watch
git checkout -b feature/amazing-feature)git commit -m '添加精彩功能')git push origin feature/amazing-feature)此项目根据MIT许可证发布 - 查看LICENSE文件以获取详细信息。
此MCP服务器经过广泛测试和验证,可以完美运行:
npx -y完美工作npx -y方法(完全验证)由Rahees Ahmed制作 ❤️