Token导航 LogoToken导航TokenDH.com
codesteward (Bitkaio) logo
开发工具stdio官方级别未说明来源级核验

codesteward (Bitkaio)

MCP Server

Codesteward是一个将代码库解析为可查询结构图并通过MCP协议为AI代理提供服务的工具,支持多语言代码分析和图形数据库后端。

工具数

5

提示词数

0

GitHub Stars

2

资源数

0
代码分析静态分析PythonClaudeClaudeCursorWindsurfCline

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Codesteward

提供方

Codesteward

最后核验

2026/5/17 20:21

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uvx --from "codesteward-mcp[graph-all,graphqlite]" codesteward-mcp setup

详细介绍

Structural code graph server for AI agents.

Parse any repository into a queryable graph via tree-sitter AST — and expose it as an MCP tool interface your AI agent can call directly. Supports Neo4j, JanusGraph, or GraphQLite (embedded SQLite — zero setup for local dev).

______________________________________________________________________

它的作用

Codesteward将您的代码库解析为持久结构图,并公开四个 模型上下文协议 AI代理(Claude Code、Cursor、Windsurf、Copilot等)可以调用的工具来回答以下问题:

  • *“JWT身份验证保护哪些功能?”*
  • *“什么 process_payment 呼叫,传递?"*
  • *“哪些文件依赖于此外部包?”*
  • *“此路由是否由身份验证中间件保护?”*

代理不会重复扫描文件,而是查询预先构建的图——跨文件关系、调用链、身份验证保护和依赖边都在一个查询中解析。

支持的语言: TypeScript·JavaScript·Python·Java·Go·Rust·PHP·C#·Kotlin·Scala·C·C++·SQL *(上下文标记)* ·COBOL *(正则表达式)*

MCP工具

工具说明
graph_rebuild解析存储库并将结构图写入配置的后端(Neo4j、JanusGraph或GraphQLite)或在存根模式下运行
codebase_graph_query通过命名模板查询(lexical, referential, semantic, dependency)或直接通过(cypher / gremlin)
graph_augment将代理推断的关系(置信度\ 注: 克劳德代码要求 "type": "stdio" 在服务器配置中。其他工具
(Cursor,Cline)不需要它。
工具配置文件
克劳德代码~/.claude.json (根据 mcpServers)
光标~/.cursor/mcp.json
克莱恩cline_mcp_settings.json 在VS代码全局存储中
Codex CLI~/.codex/config.yaml (根据 mcp_servers)
Gemini CLI~/.gemini/settings.json (根据 mcpServers)

需要 紫外线. uvx 首次运行时下载并缓存该包。图表持续到 ~/.codesteward/graph.db 跨届会议。

Docker+Neo4j——持久图

# 1. Point the server at your repository
export REPO_PATH=/path/to/your/repository

# 2. Start Neo4j + MCP server
docker compose -f docker-compose.neo4j.yml up -d

# 3. Copy config templates into the repo you want to analyse
cp templates/.mcp.json /path/to/your/repository/
cp templates/CLAUDE.md /path/to/your/repository/

服务器运行在 http://localhost:3000/sse.致电 graph_rebuild() 没有参数——服务器已经知道卷装载的repo路径。

Docker+JanusGraph——持久图(Apache 2.0)

# 1. Point the server at your repository
export REPO_PATH=/path/to/your/repository

# 2. Start JanusGraph + MCP server
docker compose -f docker-compose.janusgraph.yml up -d

# 3. Copy config templates into the repo you want to analyse
cp templates/.mcp.json /path/to/your/repository/
cp templates/CLAUDE.md /path/to/your/repository/

与Neo4j堆栈相同的工作流程——所有命名查询模板的工作方式都相同。原始查询传递使用Gremlin而不是Cypher。

手动运行Docker

docker run -p 3000:3000 \
  -v /path/to/your/repo:/repos/project:ro \
  -e NEO4J_PASSWORD=secret \
  ghcr.io/bitkaio/codesteward-mcp:latest

有关涵盖所有AI工具的完整设置说明,请参阅 设置指南.

安装

# All 14 languages + GraphQLite (recommended for local dev)
uv pip install "codesteward-mcp[graph-all,graphqlite]"

# Core languages only (TypeScript, JavaScript, Python, Java) + GraphQLite
uv pip install "codesteward-mcp[graph,graphqlite]"

# Individual language extras
uv pip install "codesteward-mcp[graph-go,graphqlite]"       # Go
uv pip install "codesteward-mcp[graph-rust,graphqlite]"     # Rust
uv pip install "codesteward-mcp[graph-csharp,graphqlite]"   # C#
uv pip install "codesteward-mcp[graph-kotlin,graphqlite]"   # Kotlin
uv pip install "codesteward-mcp[graph-scala,graphqlite]"    # Scala
uv pip install "codesteward-mcp[graph-c,graphqlite]"        # C
uv pip install "codesteward-mcp[graph-cpp,graphqlite]"      # C++
uv pip install "codesteward-mcp[graph-php,graphqlite]"      # PHP

# Neo4j backend (alternative — requires a running Neo4j 5+ server)
uv pip install "codesteward-mcp[graph-all]"

# JanusGraph backend (alternative — requires a running JanusGraph 1.0+ server)
uv pip install "codesteward-mcp[graph-all,janusgraph]"

需要Python 3.12以上。GraphQLite是本地开发的默认后端——一个不需要外部服务的嵌入式SQLite图形数据库。图表持续到 ~/.codesteward/graph.db 跨届会议。

配置

所有设置都可以通过环境变量、YAML配置文件或CLI标志提供。 优先: CLI标志>环境变量>YAML文件>默认值.

设置环境变量默认值描述
运输TRANSPORTssesse, http,或 stdio
主持人HOST0.0.0.0HTTP绑定主机
港口PORT3000HTTP绑定端口
图形后端GRAPH_BACKENDautoauto, neo4j, janusgraph,或 graphqlite自动检测:密码设置为Neo4j,URL更改为JanusGraph,否则为GraphQLite
Neo4j URINEO4J_URIbolt://localhost:7687Neo4j连接URI
Neo4j用户NEO4J_USERneo4jNeo4j用户名
Neo4j密码NEO4J_PASSWORD*(空)*设置为启用Neo4j后端
janusgraph URLJANUSGRAPH_URLws://localhost:8182/gremlingremlin服务器websocket URL
GraphQLite数据库路径GRAPHQLITE_DB_PATH~/.codesteward/graph.dbSQLite数据库文件路径
默认租户DEFAULT_TENANT_IDlocal租户命名空间
默认回购DEFAULT_REPO_ID*(空)*代表ID
默认回购路径DEFAULT_REPO_PATH/repos/project服务器端路径 graph_rebuild
工作区WORKSPACE_BASEworkspace生成元数据目录
日志级别LOG_LEVELINFODEBUG / INFO / WARNING / ERROR

毒物分析(可选)

taint_analysiscodesteward-taint 二进制已打开 PATH没有它,服务器正常启动,其他四个工具不受影响。

码头工人

通过 --build-arg TAINT_VERSION= 下载并捆绑二进制文件:

docker build --build-arg TAINT_VERSION=0.1.0 -t codesteward-mcp:taint .

独立

从下载预构建的二进制文件 codesteward污点发布 并将其放置 上 PATH:

# macOS (Apple Silicon)
curl -L https://github.com/bitkaio/codesteward-taint/releases/latest/download/codesteward-taint-darwin-arm64 \
     -o /usr/local/bin/codesteward-taint
chmod +x /usr/local/bin/codesteward-taint

工作流程

graph_rebuild          # build the structural graph first
taint_analysis         # trace taint paths; writes TAINT_FLOW edges to Neo4j
codebase_graph_query   # query_type="semantic" to read findings

图形模型

节点-- LexicalNode

每个解析的符号都变成 LexicalNode:

属性描述
node_id稳定唯一ID: {node_type}:{tenant_id}:{repo_id}:{file}:{name}
node_typefunction, class, method, file, module, external
name符号名称
file回购相对文件路径
line_start / line_end源位置
language检测到的语言
tenant_id / repo_id多租户命名空间
confidence1.0 用于解析器发出; < 1.0 对于代理推断

边缘

边缘类型含义
CALLS函数A调用函数B(跨文件解析)
IMPORTS文件/模块导入另一个
EXTENDS类继承自另一个类
GUARDED_BY由装饰器/注释保护的功能(@login_required, @UseGuards,FastAPI Depends, @PreAuthorize, …)
PROTECTED_BY受路由器作用域中间件保护的功能(APIRouter,快递 router.use()Gin组,Actix范围,Laravel路由组,ASP。网 MapGroup().RequireAuthorization())
DEPENDS_ON文件依赖于外部包
TAINT_FLOW不受信任的输入到达危险的水槽(由 codesteward-taint;可通过以下方式查询 semantic)
calls / guarded_by / taint_flow /…代理通过以下方式推断出边 confidence < 1.0 通过 graph_augment

发展

# Setup
uv venv && source .venv/bin/activate
uv sync --all-packages --extra graph-all

# Run tests
pytest tests/ -v

# Run the server locally
codesteward-mcp --transport sse --port 3000

# Lint + type-check
ruff check src/ tests/
mypy src/

发布

更改日志.md 查看完整历史记录或浏览 .

许可证

Apache许可证2.0--版权所有(c)2026,bitkaio LLC

目录标签

目录标签

代码分析静态分析PythonClaude本地部署AI工具集成图形数据库多语言支持

支持客户端

ClaudeCursorWindsurfCline

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

5

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP