MCP server for codebase indexing, semantic search, and AI prompt enhancement.
npm install -g ace-tool@latest
Or use directly with npx:
npx -y ace-tool@latest --base-url <URL> --token <TOKEN>
Add to your MCP configuration (e.g., Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"ace-tool": {
"command": "npx",
"args": [
"ace-tool",
"--base-url", "YOUR_BASE_URL",
"--token", "YOUR_TOKEN"
]
}
}
}
| Argument | Required | Description |
|---|---|---|
--base-url |
Yes | API base URL for the indexing service |
--token |
Yes | Authentication token |
--enable-log |
No | Enable logging to .ace-tool/ace-tool.log in project directory |
Search for relevant code context based on a natural language query.
Parameters:
project_root_path (required): Absolute path to the project root directoryquery (required): Natural language description of the code you're looking forHow AI Gets the Path:
When used in an IDE (like Cursor, VS Code with MCP support), the AI automatically obtains the project path from:
1. IDE Workspace field - The Workspace field in IDE State/System Prompt
2. Terminal pwd command - Running pwd to get current directory
3. User input - Asking user to provide the path if not available
Note: In most IDE environments, you don't need to manually specify the path. The AI will automatically detect it from the IDE's workspace information.
Example queries:
Enhances user requirements by combining codebase context and conversation history to generate clearer, more specific, and actionable prompts. Opens a Web UI for user review and confirmation.
Parameters:
project_root_path (optional): Absolute path to the project root directory (defaults to current working directory)prompt (required): The original prompt to enhanceconversation_history (required): Recent conversation history (5-10 rounds) to help understand user intentTrigger Methods:
-enhance, -enhancer, -Enhance, or -Enhancer to your messageExample: "Add login feature -enhance"
Explicit request: Ask to "enhance my prompt" or "use enhance_prompt tool"
Features:
codebase-retrieval to search_context)ace-tool stores index data in a .ace-tool directory within each project:
your-project/
├── .ace-tool/
│ ├── index.json # Index metadata
│ └── ace-tool.log # Logs (if --enable-log is set)
├── src/
└── ...
The .ace-tool directory is automatically added to .gitignore.
.py, .js, .ts, .jsx, .tsx, .java, .go, .rs, .cpp, .c, .h, .hpp, .cs, .rb, .php, .swift, .kt, .scala, .clj.md, .txt, .json, .yaml, .yml, .toml, .xml, .ini, .conf.html, .css, .scss, .sass, .less, .vue, .svelte.sql, .sh, .bash, .ps1, .batace-tool provides friendly error messages for common issues:
| Error Type | Description |
|---|---|
| Token Invalid (401) | Token has expired or is invalid. Update ACE_TOKEN. |
| Access Denied (403) | Token may have been disabled. Contact service provider. |
| SSL Certificate Error | SSL certificate validation failed. Check ACE_BASE_URL. |
| Connection Refused | Cannot connect to server. Check network or service URL. |
| Connection Timeout | Request timed out. Check network status. |
| DNS Resolution Failed | Cannot resolve server address. Check ACE_BASE_URL. |
ace-tool supports real-time logging via MCP protocol. Logs are automatically pushed to MCP clients that support the logging capability.
Log levels: debug, info, warning, error
To also save logs to a local file, use the --enable-log argument.
MIT
用于代码库索引、语义搜索和 AI prompt 增强的 MCP 服务器。
npm install -g ace-tool@latest
或直接使用 npx:
npx -y ace-tool@latest --base-url <URL> --token <TOKEN>
添加到你的 MCP 配置文件(例如 Claude Desktop 的 claude_desktop_config.json):
{
"mcpServers": {
"ace-tool": {
"command": "npx",
"args": [
"ace-tool",
"--base-url", "YOUR_BASE_URL",
"--token", "YOUR_TOKEN"
]
}
}
}
| 参数 | 必填 | 描述 |
|---|---|---|
--base-url |
是 | 索引服务的 API 基础 URL |
--token |
是 | 认证令牌 |
--enable-log |
否 | 启用日志,保存到项目目录的 .ace-tool/ace-tool.log |
基于自然语言查询搜索相关代码上下文。
参数:
project_root_path(必填):项目根目录的绝对路径query(必填):描述你要查找的代码的自然语言AI 如何获取路径:
在 IDE 中使用时(如 Cursor、支持 MCP 的 VS Code),AI 会自动从以下来源获取项目路径:
1. IDE Workspace 字段 - IDE 状态/系统提示中的 Workspace 字段
2. 终端 pwd 命令 - 运行 pwd 获取当前目录
3. 用户输入 - 如果无法自动获取,会询问用户提供路径
注意: 在大多数 IDE 环境中,你不需要手动指定路径。AI 会自动从 IDE 的工作区信息中检测路径。
查询示例:
通过结合代码库上下文和对话历史来增强用户需求,生成更清晰、更具体、更可执行的 prompt。打开 Web UI 供用户审查和确认。
参数:
project_root_path(可选):项目根目录的绝对路径(默认使用当前工作目录)prompt(必填):需要增强的原始 promptconversation_history(必填):最近的对话历史(5-10 轮对话),帮助理解用户意图触发方式:
-enhance、-enhancer、-Enhance 或 -Enhancer示例:"Add login feature -enhance"
显式请求:要求"增强我的 prompt"或"使用 enhance_prompt 工具"
功能特性:
codebase-retrieval 转换为 search_context)ace-tool 在每个项目的 .ace-tool 目录中存储索引数据:
your-project/
├── .ace-tool/
│ ├── index.json # 索引元数据
│ └── ace-tool.log # 日志(如果设置了 --enable-log)
├── src/
└── ...
.ace-tool 目录会自动添加到 .gitignore。
.py, .js, .ts, .jsx, .tsx, .java, .go, .rs, .cpp, .c, .h, .hpp, .cs, .rb, .php, .swift, .kt, .scala, .clj.md, .txt, .json, .yaml, .yml, .toml, .xml, .ini, .conf.html, .css, .scss, .sass, .less, .vue, .svelte.sql, .sh, .bash, .ps1, .batace-tool 为常见问题提供友好的错误提示:
| 错误类型 | 描述 |
|---|---|
| Token 无效 (401) | Token 已过期或无效,请更新 ACE_TOKEN |
| 访问被拒绝 (403) | Token 可能已被禁用,请联系服务提供商 |
| SSL 证书错误 | SSL 证书验证失败,请检查 ACE_BASE_URL 配置 |
| 连接被拒绝 | 无法连接到服务器,请检查网络或服务地址 |
| 连接超时 | 请求超时,请检查网络状况 |
| DNS 解析失败 | 无法解析服务器地址,请检查 ACE_BASE_URL |
ace-tool 支持通过 MCP 协议实时推送日志。日志会自动推送到支持日志功能的 MCP 客户端。
日志级别:debug, info, warning, error
如需同时保存日志到本地文件,请使用 --enable-log 参数。
MIT
$ claude mcp add ace-tool \
-- python -m otcore.mcp_server <graph>