Token导航 LogoToken导航TokenDH.com
codeweave (Md Abdullah Al Mahmud) logo
开发工具未说明官方级别未说明来源级核验

codeweave (Md Abdullah Al Mahmud)

MCP Server

codeweave是一个自托管的代码上下文服务器,通过MCP协议为AI编程工具提供深度代码上下文支持,包括文件树、全文搜索、Git历史、依赖关系等,无需第三方API密钥。

工具数

7

提示词数

0

GitHub Stars

1

资源数

0
代码索引代码分析TypeScriptClaudeClaudeCursor

安装说明

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

作者 / 组织

MdAbdullahAlMahmud

提供方

MdAbdullahAlMahmud

最后核验

2026/5/17 20:23

快速接入

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

详细介绍

代码编织

](https://www.npmjs.com/package/codeweave) ![CI](https://github.com/MdAbdullahAlMahmud/codeweave/actions/workflows/ci.yml) ![License: MIT](https://opensource.org/licenses/MIT) ](https://www.npmjs.com/package/codeweave)

通过MCP(一个用于代码库的自托管、零-API-key上下文服务器)使任何回购都能立即做好AI准备。

codeweave与您的AI编码工具一起在本地运行。它将整个仓库索引到一个快速的SQLite数据库中,并将其作为 主控程序 服务器,为AI助手提供有关代码的深入、准确的上下文——文件树、全文搜索、git历史、依赖关系、堆栈检测和编码约定——而无需将代码发送给第三方。

______________________________________________________________________

快速开始

# 1. Install globally (or use npx)
npm install -g codeweave

# 2. Generate a config in your project root
cd /path/to/your/project
codeweave init

# 3. Start the MCP server
codeweave start

然后将codeweave添加到您的AI客户端(请参阅 AI客户端设置 在......下面

______________________________________________________________________

特性

特性描述
文件树带注释的JSON树,每个文件都有语言标签
全文搜索带波特词干的SQLite FTS5——亚毫秒级查询
文件内容带可选行范围切片的行号文件内容
Git历史记录最近提交的作者、日期和更改的文件
依赖图解析自 package.json, Cargo.toml, go.mod, pyproject.toml,还有6个
堆栈检测自动检测语言、框架、数据库、测试运行器、样式
公约检测文件命名样式、导入模式、组件结构
文件监视器用300ms去抖动在\<1s内重新索引更改的文件
增量索引基于mtime的缓存——热启动时间\<30ms
API密钥为零完全在本地运行。没有云。没有遥测。

______________________________________________________________________

AI客户端设置

codeweave使用stdio MCP传输,并与任何兼容MCP的客户端配合使用。

克劳德代码

添加 .claude/settings.json 在项目根目录中:

{
  "mcpServers": {
    "codeweave": {
      "command": "npx",
      "args": ["codeweave"],
      "cwd": "."
    }
  }
}

光标

添加 .cursor/mcp.json 在项目根目录中:

{
  "mcpServers": {
    "codeweave": {
      "command": "npx",
      "args": ["codeweave"],
      "cwd": "${workspaceFolder}"
    }
  }
}

泽德

添加 ~/.config/zed/settings.json:

{
  "context_servers": {
    "codeweave": {
      "command": {
        "path": "npx",
        "args": ["codeweave"]
      }
    }
  }
}

Continue.dev

添加 .continue/config.json:

{
  "mcpServers": [
    {
      "name": "codeweave",
      "command": "npx",
      "args": ["codeweave"]
    }
  ]
}

______________________________________________________________________

CLI 参考

codeweave [command] [options]

Commands:
  start    Start the MCP server (default)
  init     Generate codeweave.config.js in the current directory
  status   Show indexing stats for the current repo

Options:
  --verbose    Enable debug logging
  -V, --version  Show version number
  -h, --help     Show help

查看完整 CLI参考→

______________________________________________________________________

配置

codeweave init 生成a codeweave.config.js。所有字段都是可选的——默认值适用于大多数项目。

// codeweave.config.js
export default {
  // Directories to index (relative to config file)
  include: ['src'],

  // Extra patterns to exclude beyond .gitignore
  exclude: ['**/*.generated.ts'],

  // Files larger than this are truncated (KB)
  maxFileSizeKB: 100,

  // How many git commits to read
  gitDepth: 50,

  // Port for future HTTP transport
  port: 3333,

  // Enable verbose/debug logging
  verbose: false,
};

查看完整 配置参考→

______________________________________________________________________

MCP工具

codeweave公开了7个人工智能助手可以调用的MCP工具:

工具说明
get_file_tree带注释的文件树,可按语言过滤
get_file带有行号和可选行范围的文件内容
search_codebase使用片段上下文进行全文搜索
get_conventions检测到命名样式、导入模式、测试框架
get_dependencies解析清单文件中的所有依赖项
get_git_history最近的提交,可按文件路径过滤
get_stack_info检测到的语言、框架、数据库、工具

查看完整 API 参考→

______________________________________________________________________

建筑

your repo on disk
      │
      ▼
┌─────────────────────────────────────────────────────┐
│                   codeweave process                  │
│                                                     │
│  ┌──────────┐  ┌──────────┐  ┌───────────────────┐ │
│  │ File     │  │   Git    │  │  Manifest Parser  │ │
│  │ Scanner  │  │  Reader  │  │  (9 formats)      │ │
│  └────┬─────┘  └────┬─────┘  └────────┬──────────┘ │
│       │              │                 │            │
│       └──────────────┴─────────────────┘            │
│                       │                             │
│              ┌────────▼────────┐                   │
│              │  SQLite DB      │                   │
│              │  (WAL + FTS5)   │◄──────────────────┤
│              └────────┬────────┘     File Watcher  │
│                       │                             │
│       ┌───────────────┼───────────────┐            │
│       ▼               ▼               ▼            │
│  get_file_tree   search_codebase  get_stack_info   │
│  get_file        get_conventions  get_dependencies │
│  get_git_history                                   │
│       │                                            │
│       └──────────────────────────────────────────┐ │
│                    MCP Server (stdio)             │ │
└───────────────────────────────────────────────────┘
                        │
              ┌─────────┘
              ▼
    AI client (Claude Code, Cursor, Zed…)

关键设计决策:

  • SQLite在内存中 --完整的文件内容存储在磁盘上,而不是Node.js堆中。无论仓库大小如何,内存使用率都保持不变。
  • FTS5搬运工标记器 --处理词干的全文搜索(authenticateauthenticat)没有任何外部依赖。
  • mtime缓存 --未更改的文件永远不会被重新读取。1K文件仓库的热启动需要大约28毫秒。
  • 标准运输 --没有端口冲突,没有防火墙规则。适用于AI客户端可以生成子流程的任何环境。

______________________________________________________________________

支持的堆栈

codeweave检测并解析:

语言: TypeScript、JavaScript、Python、Go、Rust、Dart、Ruby、PHP、Java、Kotlin、Swift等

框架: Next.js、Nuxt、Remix、SvelteKit、Astro、Vite+React、Express、Fastify、NestJS、Hono、Django、Flask、FastAPI、Rails、Laravel、Symfony、Angular、Vue、Svelte

数据库: Prisma、TypeORM、Drizzle、MongoDB、PostgreSQL、MySQL、SQLite、Redis、Sequelize

清单格式: package.json, pubspec.yaml, Cargo.toml, go.mod, requirements.txt, pyproject.toml, composer.json, Gemfile, build.gradle

______________________________________________________________________

贡献

欢迎投稿!请阅读 贡献.md 了解如何分叉、开发、测试和提交PR的指南。

git clone https://github.com/MdAbdullahAlMahmud/codeweave.git
cd codeweave
npm install
npm test         # run tests
npm run typecheck  # type check
npm run lint     # lint

______________________________________________________________________

许可证

麻省理工学院©阿卜杜拉——见 许可证 了解详情。

目录标签

目录标签

代码索引代码分析TypeScriptClaude本地部署AI编程助手自托管服务MCP协议

支持客户端

ClaudeCursor

接入字段

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

未说明

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

none

工具数量(toolCount,工具数)

7

资源数量(resourceCount,资源数)

0

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

0

权限和风险

未说明none部署方式未说明

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

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP