关于 semantic-search-mcp-server
semantic-search-mcp-server 是基于 mcp-framework 构建、面向 Claude Desktop 用户的 MCP 服务,提供语义搜索能力。开发者可使用框架的命令行扩展工具。
主要功能
- 01为 Claude Desktop 提供语义搜索
- 02基于 mcp-framework 构建
- 03可扩展的工具结构
- 04通过命令行生成工具
适用场景
- 01为 Claude Desktop 添加语义搜索
- 02扩展服务并添加自定义工具
MCP 相关
它以 MCP 服务形式向 MCP 客户端提供工具。README 介绍了 Claude Desktop 配置方式,以及通过 mcp-framework 添加工具。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
semantic-search-mcp-server
一个使用 mcp-framework 构建的模型上下文协议(MCP)服务,可为 Claude Desktop 增添语义搜索功能。
文档
详细的设置说明和用法请参阅:
快速开始
# Install dependencies
npm install
# Build the project
npm run build
项目结构
semantic-search-mcp-server/
├── src/
│ ├── tools/ # MCP Tools
│ │ └── ExampleTool.ts
│ └── index.ts # Server entry point
├── Userguide.md # Setup guide for Claude Desktop users
├── DeveloperGuide.md # Technical guide for developers
├── package.json
└── tsconfig.json
面向开发者
以下部分包含技术信息,供希望修改或扩展此服务的开发者参考。
添加组件
项目自带一个示例工具,位于 src/tools/ExampleTool.ts。你可以使用 CLI 添加更多工具:
# Add a new tool
mcp add tool my-tool
# Example tools you might create:
mcp add tool data-processor
mcp add tool api-client
mcp add tool file-handler
工具开发
示例工具结构:
import { MCPTool } from "mcp-framework";
import { z } from "zod";
interface MyToolInput {
message: string;
}
class MyTool extends MCPTool<MyToolInput> {
name = "my_tool";
description = "Describes what your tool does";
schema = {
message: {
type: z.string(),
description: "Description of this input parameter",
},
};
async execute(input: MyToolInput) {
// Your tool logic here
return `Processed: ${input.message}`;
}
}
export default MyTool;
发布到 npm
-
更新你的 package.json:
- 确保
name唯一且符合 npm 命名规范 - 设置合适的
version - 添加
description、author、license等信息 - 检查
bin是否指向正确的入口文件
- 确保
-
在本地构建并测试:
npm run build npm link semantic-search-mcp-server # Test your CLI locally -
登录 npm(如有需要,请创建账号):
npm login -
发布你的包:
npm publish
发布后,用户可以将其添加到 Claude 桌面客户端(见下文),或使用 npx 运行
## Using with Claude Desktop
### Local Development
Add this configuration to your Claude Desktop config file:
**MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"semantic-search-mcp-server": {
"command": "node",
"args":["/absolute/path/to/semantic-search-mcp-server/dist/index.js"]
}
}
}
发布后
将此配置添加到你的 Claude Desktop 配置文件中:
MacOS:~/Library/Application Support/Claude/claude_desktop_config.json
Windows:%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"semantic-search-mcp-server": {
"command": "npx",
"args": ["semantic-search-mcp-server"]
}
}
}
构建和测试
- 修改你的工具
- 运行
npm run build进行编译 - 服务将在启动时自动加载你的工具
了解更多
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。