semantic-code-mcp
by huawang1258
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 |
Capabilities
Features and capabilities supported by this server
| 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 | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/huawang1258/semantic-code-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server