MCP服务框架

一个结构化为monorepo的MCP服务框架,包含服务器、客户端和AI代理组件,支持与VSCode Copilot等客户端集成。

  • by Subhash3
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 Subhash3/hi-mcp

使用说明

只是想了解mcp的东西!!

设置

结构为单回购

  • server/ -MCP服务器
  • client/ -MCP客户端
  • agent/ -AI代理
pnpm install # Install dependencies
pnpm run build # Build all packages (generates dist/ folders)

与客户建立联系

与检查员(MCP服务器)互动

(尽管没什么可玩的)

pnpm run inspector

连接到VSCode副驾驶

您可以选择任何其他MCP客户端,但副驾驶是我唯一尝试过的。

  1. 打开vscode实例
  2. 点击配置工具图标
  3. 点击“添加MCP服务器”图标
  4. 选择“Command(stdio)”选项,因为这是此项目使用的传输方式
  5. 我们的命令是 node <path/to/hi-mcp/server/dist/index.js>
  6. 它将生成如下配置:
{
	"servers": {
		"nice-mcp-server": {
			"type": "stdio",
			"command": "node",
			"args": [
				"~/Projects/hi-mcp/server/dist/index.js"
			]
		}
	},
	"inputs": []
}
  1. 现在使用 #sayHi 副驾驶聊天中的验证命令

海关代理人

(一个超低劣的副驾驶)

pnpm run agent
  • 使用连接到mcp服务器 client 包裹
  • 使用谷歌的 gemini-2.5-flash 响应消息的模型