MCP 服务器模板

MCP 服务器模板

这是 https://github.com/stevennevins/architect-mcp-server 的镜像仓库,包含用于架构设计反馈的工具。

快速入门

前置条件

  • 安装 LLM CLI 工具:
    brew install llm
    
    确保 llm 可用:
    llm --version
    

开发步骤

  1. 安装依赖:
    npm install
    
  2. 启动开发服务器:
    npm run dev
    
  3. 构建项目:
    npm run build
    
  4. 运行测试:
    npm test
    
  5. 启动生产服务器:
    npm start
    

测试与调试

  • 使用 MCP Inspector 进行可视化调试:
    npx @modelcontextprotocol/inspector node dist/index.js
    
    打开 http://localhost:5173 进行交互式测试。
  • 使用 TestClient 编写单元测试。

本地测试

  1. 构建并链接包:
    npm run build
    npm run link
    
  2. 在 Cursor 中添加服务器配置,运行命令:
    npx architect-test-mcp-tool