AI编码工具集

轻量级AI编码工具集服务器,提供21种工具覆盖4个模块,支持AI IDE集成。

  • by kevinten-ai
  • Python
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 kevinten-business/ai-coding-mcp

使用说明

AI编码MCP v2

用于AI IDE的轻量级MCP服务器(Claude Code、Cursor等)。在4个模块中提供21个工具,无需LLM包装。

快速开始

pip install -r requirements.txt
python server.py

模块

上下文(4个工具)

  • index_project -索引项目文件并提取符号
  • get_symbol_info -查找符号信息
  • get_dependency_graph -分析文件依赖关系
  • get_project_stats -获取项目统计信息

知识(4个工具)

  • search_docs -搜索文档(存根)
  • get_package_info -查询包注册表(PyPI/NMP)
  • search_code_examples -搜索代码示例(存根)
  • check_compatibility -检查依赖关系兼容性

工作流程(6个工具)

  • git_status -获取git工作树状态
  • git_history -获取提交历史记录
  • git_branch_analysis -分析分支(存根)
  • ci_status -检查CI状态(存根)
  • issue_list -列出GitHub问题(存根)
  • pr_summary -获取PR摘要(存根)

规格(6个工具)

  • list_specs -列出规范文件
  • get_spec -阅读规范内容
  • search_specs -搜索规格
  • create_spec -从模板创建新规范
  • scaffold_project -模板脚手架工程
  • validate_structure -验证目录结构(存根)

建筑

  • CLI优先:所有外部通话均通过 git, gh, pip, npm, curl
  • 零LLM包装:返回结构化数据,让AI IDE分析
  • 基于文件的缓存:TTL缓存在 ~/.cache/ai-coding-mcp/
  • Pydantic配置:类型安全配置

项目结构

ai-coding-mcp/
├── server.py                    # FastMCP entry, tool registration
├── config.py                    # Pydantic config
├── tools/
│   ├── context/                 # code_indexer, dependency_graph, project_stats
│   ├── knowledge/               # doc_search, package_info, code_search, compatibility
│   ├── workflow/                # git_ops, ci_github
│   └── specs/                   # spec_manager, scaffold, validator
├── utils/
│   ├── cli_runner.py            # Unified CLI executor
│   └── cache.py                 # File-based TTL cache
├── tests/
├── requirements.txt
└── README.md

测试

pytest tests/ -v

IDE配置

对于Claude Code,添加到MCP设置中:

{
  "mcpServers": {
    "ai-coding": {
      "command": "python",
      "args": ["server.py"]
    }
  }
}

许可证

MIT许可证