本指南将引导您完成项目的前后端环境搭建过程,助您快速开启项目之旅。
backend目录:cd backend
npm install
backend文件夹中创建一个.env文件,并添加以下环境变量:PORT=5000
FRONTEND_URL=http://localhost:5173
npm run dev
服务器现在将在http://localhost:5000上运行。frontend目录:cd frontend
npm install
frontend文件夹中创建一个.env文件,并添加以下环境变量:VITE_BACKEND_URL=http://localhost:5000
npm run dev
客户端现在将在http://localhost:5173上运行。💡 使用建议
- 确保前后端同时运行。
- 您可以在访问
http://localhost:5173前,确保前后端服务器均已启动并运行。
这是一个简单的 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 注册表文档。