simple
示例,用极简代码,演示如何构建MCP Server。
claude mcp add --transport stdio guog-simple-mcp-server node build/index.js \ --env GAODE_API_KEY="your_gaode_web_api_key" \ --env DINGTALK_ACCESS_TOKEN="your_dingtalk_webhook_token"
How to use
This MCP server provides two integrated capabilities: a weather query service powered by the AMap (Gaode) Weather API, and a DingTalk group notification bridge. When used through an MCP-enabled client, the server can receive requests that include a location (e.g., a city or coordinates) and return current and forecast weather data, then pass relevant results back to the AI or client. Separately, the server can post formatted weather summaries or alerts to a configured DingTalk group via a webhook. The workflow illustrated in the project demonstrates an AI deciding to call the weather MCP, supplying the location details, retrieving the weather from Gaode, and returning a composed answer to the user, with the option to push messages to DingTalk when needed.
To use it in Cherry Studio or any MCP-enabled client, configure the MCP server with the provided command and environment variables, connect to the server, and ensure your chosen model supports Function Call features if you want the server to be invoked automatically by the AI for weather data or DingTalk updates.
How to install
Prerequisites:
- Node.js 22+ installed on your system
- pnpm package manager
- Access to the internet to install dependencies
Steps:
-
Clone the repository locally git clone https://github.com/your-organization/guog-simple-mcp-server.git cd guog-simple-mcp-server
-
Install dependencies pnpm install
-
Build the MCP server pnpm build
-
Run or prepare for integration node build/index.js
Note: The README describes configuring Cherry Studio (or another MCP client) to run the server via the generated build/index.js path and to supply required environment variables.
Additional notes
Environment variables:
- GAODE_API_KEY: Your Gaode Web API key (32-bit) for weather data retrieval.
- DINGTALK_ACCESS_TOKEN: The 64-bit key portion from your DingTalk custom robot webhook.
Common issues and tips:
- Ensure the Gaode API key is valid and has the Weather API enabled.
- If the DingTalk webhook fails, double-check the token and that the custom robot is enabled in the target group.
- When testing, use a model that supports Function Call to trigger MCP interactions automatically.
- The MCP server expects requests that include location data (e.g., city name or coordinates) as part of the input payload; ensure the client sends the required fields.
- If you modify the server path after build, update the Cherry Studio command path accordingly.
Related MCP Servers
obsidian -tools
Add Obsidian integrations like semantic search and custom Templater prompts to Claude or any MCP client.
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
mcp -arangodb
This is a TypeScript-based MCP server that provides database interaction capabilities through ArangoDB. It implements core database operations and allows seamless integration with ArangoDB through MCP tools. You can use it wih Claude app and also extension for VSCode that works with mcp like Cline!
CodeRAG
Advanced graph-based code analysis for AI-assisted software development
mcp-bundler
Is the MCP configuration too complicated? You can easily share your own simplified setup!