Back to MCP directory
publicPublicdnsLocal runtime

project-setup-guide

项目设置指南,包含后端和前端的环境配置与启动步骤,以及一个用于检查MCP服务器可用性的API接口。

article

README

🚀 项目设置指南

本指南将引导您完成项目的前后端环境搭建过程,助您快速开启项目之旅。

🚀 快速开始

📦 安装指南

🔧 配置后端

  1. 进入backend目录:
    cd backend
    
  2. 执行以下命令安装所需依赖:
    npm install
    
  3. backend文件夹中创建一个.env文件,并添加以下环境变量:
    PORT=5000
    FRONTEND_URL=http://localhost:5173
    
  4. 使用以下命令运行服务器:
    npm run dev
    
    服务器现在将在http://localhost:5000上运行。

🔧 配置前端

  1. 进入frontend目录:
    cd frontend
    
  2. 执行以下命令安装所需依赖:
    npm install
    
  3. frontend文件夹中创建一个.env文件,并添加以下环境变量:
    VITE_BACKEND_URL=http://localhost:5000
    
  4. 使用以下命令运行客户端:
    npm run dev
    
    客户端现在将在http://localhost:5173上运行。

💡 使用建议

💡 使用建议

  • 确保前后端同时运行。
  • 您可以在访问http://localhost:5173前,确保前后端服务器均已启动并运行。

💻 使用示例

MCP 服务器检查 API

这是一个简单的 Node.js Express 终端,通过使用请求正文中的installationCode参数查询https://registry.smithery.ai/servers/{installationCode}来检查 MCP 服务器的可用性。服务器会根据连接是否成功返回相应的响应信息。

接口

POST /test-server

请求正文

{
  "installationCode": "your-installation-code"
}

响应

{
  "success": true,
  "message": "MCP Server is reachable",
  "data": {
    "qualifiedName": "server-qualified-name",
    "displayName": "Server Display Name",
    "deploymentUrl": "https://deployment-url.com",
    "connections": [
      {
        "type": "http",
        "url": "https://connection-url.com",
        "configSchema": {}
      }
    ]
  }
}

📚 详细文档

如需了解更多详细信息,请访问史密斯ery 注册表文档

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client