- MCP Server Coding Demo Guide
MCP Server Coding Demo Guide
Content
MCP Server Coding Demo Guide
Step 1: Clone the Repository
- Create a folder on your device where you'll store your MCP servers to stay organized.
- Clone the repository into that folder.
Step 2: Review the Source Files
- Navigate to the
srcfolder and review the following files:index.ts: A basic template server that requires modifications.demo.ts: A functional example that demonstrates an API integration.
Step 3: Select an API
- Go to RapidAPI and find an API and endpoint to use.
- Get access and your autorization key. Review the example output to understand how the request should be structured.
- Ensure you retrieve the correct headers, authorization details, and request parameters.
Note: Suggested to use an API with good ratings and clear output. To be sure that it's reliable.
Step 4: Configure Your Demo
- Define the server name - choose something which will be easy for you or an end user to recognise.
- Define Your Tool: Choose a name that makes sense for your use case. Collect parameters, and mark them as required if they are needed.
- Configure the Resource:
- Ensure the API is properly called. Configure your authorization headers and endpoint url.
- Pass the correct data in with the request.
- Note - handle authentication correctly (either within the MCP configuration or a
.envfile).
Step 5: Install and Build
- Install dependencies if not already installed:
npm install npm run build
Step 6: Configure Your Chat App
- Use the example configuration as your base and edit the following:
- Build path to match your build file location.
- Set an appropriate tool name.
- Ensure the command is correct.
- Insert your API key as an ENV value.
- Save the configuration file for your cloud desktop or 5ier setup.
- ~/Library/Application Support
- Restart the chat application to apply the changes.
{
"stock": {
"command": "node",
"args": ["users/mcp-servers/mcp-server-demo-1/build/demo.js"],
"env": {
"RAPIDAPI_KEY": "XXX-XXX-XXX-XXX-XXX-XXX-XXX-XXX-XXX"
},
"disabled": false,
"autoApprove": []
}
}
Step 8: Test Your Setup
- Launch a chat and verify that your server is working as expected.
Debugging and Troubleshooting
Help!
Setting up MCP on Claude Desktop (user guide)
https://modelcontextprotocol.io/quickstart/user
Making an MCP server quickstart guide (dev guide)
https://modelcontextprotocol.io/quickstart/server
MCP 101 and building an MCP Server
https://glama.ai/blog/2024-11-25-model-context-protocol-quickstart
TS MCP SDK
https://github.com/modelcontextprotocol/typescript-sdk
5ire - How to add MCP to 5ire
- Open the application support folder and edit the MCP config file.
https://5ire.app/docs
Not feeling confident with the code? - Consider the Cline Way
- Install Cline on VS Code. https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev
- Add your API key to Cline
- Select a capable model (Claude3.5, Deepseek, Gpt4o or Gemini Pro)
- Create a new directory and instruct cline to build you an MCP server.
- You can use the sample prompt included in the repo.
Additional Notes
- Links to specific debugging resources and chat app configurations will be added.
- MCP servers can be deployed and tested directly within Klein.
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
ChatWiseThe second fastest AI chatbot™
Serper MCP ServerA Serper MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Playwright McpPlaywright MCP server
Tavily Mcp
DeepChatYour AI Partner on Desktop
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Amap Maps高德地图官方 MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
WindsurfThe new purpose-built IDE to harness magic