R
RahulSankhla312/contextsmith
A local context engine for Claude Code, Cursor, Codex and any MCP agent.
更新 2026-10-25
在 GitHub 查看 ↗直链 · 无中转页
我们没有可直接复制的安装命令,也没有公开的远端端点,所以不出配置。上面那条命令仅供参考,不是我们能担保的可复制命令——编一条出来比不给更糟。 各客户端的接法 →
- ★ 数取值
- 0 ★ · RahulSankhla312/contextsmith · 取自 GitHub 搜索 API · (2026-11-19 20:00:48 核对)
- 来源明细
- 收录自 punkpeye/awesome-mcp-servers 榜单(我们从中收集的条目之一) · 条目类型:MCP 服务
- 收录与活跃
- 收录于 2026-11-18 · 最近见到 2026-11-20 · 共见到 3 次 · 被 3 个来源列出
- 评分构成
- 综合分 300 · 3 个来源 · mcp
常见问题(答案都来自我们的记录)
它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库
RahulSankhla312/contextsmith;我们收录于 2026-11-18;最近见到 2026-11-20。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。README 原文(英文,未翻译) · 在 GitHub 读完整 README →
# ContextSmith
以下摘录自该仓库的 README(片段)
### Give your coding agent the right code, not more code.
A local context engine for Claude Code, Cursor, Codex and any MCP agent. It indexes your
repository into a code graph, hybrid search and git history, and answers every task with
the code that matters, packed into a token budget you choose.
▶ Watch the 60-second video : indexing, context packing, live MCP calls and the benchmark.
Coding agents spend their context window on the wrong code. They grep, open whole files,
and run out of room before they reach the function that needs the fix, and you pay for
every token they read. ContextSmith answers one question as well as possible: given this
task and N tokens, what code should the agent read?
92% of real bug fixes had the right file inside a 4,000-token context vs 29% for search + whole files
1.7x more often the exact lines to change are shown 48% vs 29%, same budget
100% local no API keys, no cloud, code never leaves the machine
Measured on 114 Django issues from SWE-bench Lite that no tuning step ever saw. Method and full results .
## Quickstart (60 seconds)
bash
pipx install "contextsmith[semantic]" # or: pip install "contextsmith[semantic]"
cd your-repo
ctxsmith index # once; afterwards only changed files are re-read
ctxsmith context "Coupons are applied twice at checkout" --budget 4000
Connect it to your agent (the command prints the exact line for your machine):
bash
ctxsmith mcp-config claude # or: cursor, windsurf, codex
claude mcp add contextsmith -- ctxsmith serve --path /path/to/your-repo
From then on the agent calls get_context itself and gets ranked, budgeted code instead of
grepping. Without the [semantic] extra everything still works, using keyword search only.
## Who it's for
### Developers
Faster, better agent sessions on big repos. The agent starts from the right functions
instead of exploring; fewer wrong edits and "I couldn't find it" loops.
Understand unfamiliar code. ctxsmith context "where are payment retries handled?"
returns the relevant functions with their file and line numbers.
Change safely. ctxsmith impact charge_card lists everything that calls it,
transitively: what a change could break, before you make it.
Remember the gotchas. ctxsmith note add "never call without the account lock" --symbol
charge_card pins a note to the code; it shows up in every future context for that code,
for you and for the agent.
### Teams and companies
| Need | How ContextSmith covers it |
| Code that must not leave the building (finance, health, government, enterprise IP) | Runs entirely on the developer's machine. Parsing, search and embeddings are local; the only network use is a one-time download of two small open models, which you can mirror internally for air-gapped machines |
| Predictable AI spend | Every answer has a hard token budget you set, so context cost per task is fixed instead of "whatever the agent opened" |
| Works with the agents you already pay for | Standard MCP server: Claude Code, Cursor, Windsurf, Codex, Copilot agents and in-house agents use the same index |
| Onboarding | New engineers and their agents ask questions in plain language and land on the right code |
| Code review and CI | ctxsmith context "$PR_TITLE" -b 6000 gives a review bot the code a PR touches and depends on; ctxsmith impact NAME shows the blast radius |
A local context engine for Claude Code, Cursor, Codex and any MCP agent. It indexes your
repository into a code graph, hybrid search and git history, and answers every task with
the code that matters, packed into a token budget you choose.
▶ Watch the 60-second video : indexing, context packing, live MCP calls and the benchmark.
Coding agents spend their context window on the wrong code. They grep, open whole files,
and run out of room before they reach the function that needs the fix, and you pay for
every token they read. ContextSmith answers one question as well as possible: given this
task and N tokens, what code should the agent read?
92% of real bug fixes had the right file inside a 4,000-token context vs 29% for search + whole files
1.7x more often the exact lines to change are shown 48% vs 29%, same budget
100% local no API keys, no cloud, code never leaves the machine
Measured on 114 Django issues from SWE-bench Lite that no tuning step ever saw. Method and full results .
## Quickstart (60 seconds)
bash
pipx install "contextsmith[semantic]" # or: pip install "contextsmith[semantic]"
cd your-repo
ctxsmith index # once; afterwards only changed files are re-read
ctxsmith context "Coupons are applied twice at checkout" --budget 4000
Connect it to your agent (the command prints the exact line for your machine):
bash
ctxsmith mcp-config claude # or: cursor, windsurf, codex
claude mcp add contextsmith -- ctxsmith serve --path /path/to/your-repo
From then on the agent calls get_context itself and gets ranked, budgeted code instead of
grepping. Without the [semantic] extra everything still works, using keyword search only.
## Who it's for
### Developers
Faster, better agent sessions on big repos. The agent starts from the right functions
instead of exploring; fewer wrong edits and "I couldn't find it" loops.
Understand unfamiliar code. ctxsmith context "where are payment retries handled?"
returns the relevant functions with their file and line numbers.
Change safely. ctxsmith impact charge_card lists everything that calls it,
transitively: what a change could break, before you make it.
Remember the gotchas. ctxsmith note add "never call without the account lock" --symbol
charge_card pins a note to the code; it shows up in every future context for that code,
for you and for the agent.
### Teams and companies
| Need | How ContextSmith covers it |
| Code that must not leave the building (finance, health, government, enterprise IP) | Runs entirely on the developer's machine. Parsing, search and embeddings are local; the only network use is a one-time download of two small open models, which you can mirror internally for air-gapped machines |
| Predictable AI spend | Every answer has a hard token budget you set, so context cost per task is fixed instead of "whatever the agent opened" |
| Works with the agents you already pay for | Standard MCP server: Claude Code, Cursor, Windsurf, Codex, Copilot agents and in-house agents use the same index |
| Onboarding | New engineers and their agents ask questions in plain language and land on the right code |
| Code review and CI | ctxsmith context "$PR_TITLE" -b 6000 gives a review bot the code a PR touches and depends on; ctxsmith impact NAME shows the blast radius |
收录徽章(可选)
想把收录标记放进 README 就复制这行,可选,不影响收录。
[](https://anclum.com/zh/s/rahulsankhla312-contextsmith/)
- 来源
- awesome · https://github.com/RahulSankhla312/contextsmith
- 按领域浏览
- MCP 服务
- 收录来源
- 3 个独立来源
- 收录于
- 今天
更多 MCP 服务器
所属领域与标签
每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。