semantic-code-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SCM_TOP_K | No | 向量召回候选数 | 50 |
| SCM_TOP_N | No | 最终返回结果数 | 10 |
| SCM_WATCH | No | 文件监控:`1` 启用(默认),`0` 禁用 | 1 |
| SCM_DB_DIR | No | 索引数据库存放目录 | ~/.semantic-code-mcp |
| HTTPS_PROXY | No | Cohere API 代理(国内需配) | |
| COHERE_API_KEY | No | 可选 rerank 后备后端;默认用 Voyage rerank-2.5,无需此 key | |
| VOYAGE_API_KEY | Yes | Voyage embedding + rerank(同一个 key 双用) | |
| SCM_EMBED_DTYPE | No | 向量精度:`float`(最高精度)/ `int8`(省 71% 存储) | float |
| SCM_EMBED_MODEL | No | Embedding 模型 | voyage-code-3 |
| SCM_RERANK_MODEL | No | 按后端默认:voyage → `rerank-2.5`,cohere → `rerank-v3.5` | |
| SCM_EMBED_BACKEND | No | Embedding 后端:voyage(默认)或 local | voyage |
| SCM_MAX_WORKSPACES | No | 最大同时管理的工作区数(LRU 淘汰) | 8 |
| SCM_RERANK_BACKEND | No | rerank 后端:`auto`(有 VOYAGE key 用 Voyage,其次 Cohere)/ `voyage` / `cohere` / `off` | auto |
| SCM_EMBED_CHAR_BUDGET | No | 单批最大字符数(未绑卡时可调小) | 200000 |
| SCM_EMBED_CONCURRENCY | No | 索引时 embedding 并发请求数(实测 3 路≈提速 3 倍) | 3 |
| SCM_EMBED_MAX_RETRIES | No | API 限流/错误时自动重试次数 | 4 |
| SCM_EMBED_MIN_INTERVAL | No | 请求最小间隔秒数(未绑卡 3 RPM 限制时设 `21`) | 0 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| codebase_searchA | 语义检索代码库,返回最相关的代码片段。 Args: information_request: 自然语言查询,例如"用户登录鉴权逻辑在哪里" directory_path: 要检索的代码库绝对路径 top_n: 可选,返回结果数(0 = 用默认值 SCM_TOP_N,默认 10) path_filter: 可选,文件路径过滤;含通配符按 glob 匹配(如 "*.java"、"/service/"), 否则按路径子串匹配(如 "controller") include_related: 可选,是否附带 call graph 关联块(调用者/被调用者),默认 True |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 1 tool
With only one tool, there is no possible ambiguity. Any agent will know exactly which tool to use for semantic code search.
The single tool name 'codebase_search' is descriptive and follows a clear verb_noun pattern. Consistency is perfect with only one tool.
One tool is borderline thin for a code-related server, but it fits a focused semantic search purpose. The count is minimal but not inappropriate given the specific domain.
The server covers semantic search well, but lacks complementary tools like file retrieval or code structure queries. Notable missing operations limit its utility for broader code workflows.