Package Exports
- @aipmanager/search-mcp
- @aipmanager/search-mcp/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@aipmanager/search-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Search MCP
提供与 Cursor Agent 的 Search 工具等价的能力,参考文档见 https://docs.cursor.com/en/agent/tools#search。
- Read File:读取文件,支持 offset/limit 行范围
- List Directory:列出目录结构
- Grep:正则匹配搜索,支持上下文、大小写/多行、数量限制
- Search Files:基于文件名的模糊匹配
- Codebase(语义搜索):调用 Milvus/Pinecone 进行代码语义检索(需向量库与嵌入配置)
- Web:Google CSE 搜索(未配置时返回占位结果)
使用
pnpm i
pnpm build
node dist/index.js或在 MCP 客户端中以 command 方式启动可执行 search-mcp。
环境变量
- INDEXER_VECTOR_PROVIDER=milvus|pinecone
- MILVUS_ADDRESS=localhost:19530
- MILVUS_USERNAME=...
- MILVUS_PASSWORD=...
- MILVUS_COLLECTION=code_chunks
- PINECONE_API_KEY=...
- PINECONE_INDEX=...
- PINECONE_NAMESPACE=default
- OPENAI_API_KEY=... (用于生成查询向量)
- GOOGLE_API_KEY / GOOGLE_CSE_ID(可选,用于 webSearch)
工具定义
详见 src/index.ts 的 registerTool 定义:readFile、listDirectory、grepSearch、searchFiles、codebaseSearch、webSearch。