mcp server demo
环境
npm icursor 配置
stdio 方式
{
"mcpServers": {
"weather-server": {
"command": "npx",
"args": ["tsx", "/weather-server-ts/src/index.ts"],
"env": {
"API_KEY": ""
}
}
}
}streamenable 方式
启动 server
npm run dev配置 cursor your_api_key 是高德地图的 api key
{
"mcpServers": {
"weather-server-streamable-http": {
"type": "http",
"url": "http://localhost:8003/mcp?key="
}
}
}