Get the FREE Ultimate OpenClaw Setup Guide →

mcp-demos

《从原理到实战:掌握 MCP》系列文章的示例代码库

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jinzcdev-mcp-demos node mcp-client-demo/index.js \
  --env MCP_ENDPOINT="default"

How to use

This MCP server bundle demonstrates three example MCP services. The weather-server-node provides a Node.js-based weather service with weather forecast and alert capabilities, the simple-filesystem-server-python offers a lightweight Python-based file system service with common file operations, and the mcp-client-demo shows how to create multiple MCP connections and query available tools from each server. To interact with these services, start the servers using the commands above or your preferred runner, then run the MCP client tooling to discover and invoke the available tools on each server. The client will typically list tools, show their input requirements, and allow you to call them to receive responses or push updates.

How to install

Prerequisites:

  • Node.js (for the Node-based servers and client demo)
  • Python (for the Python-based server)
  • Git (to clone the repository)

Installation steps:

  1. Clone the repository: git clone https://github.com/your-org/mcp-demos.git
  2. Navigate into the project: cd mcp-demos
  3. Install Node.js sub-project dependencies (weather-server-node and mcp-client-demo): cd weather-server-node && npm install && cd .. cd mcp-client-demo && npm install && cd ..
  4. Install Python sub-project dependencies (simple-filesystem-server-python): (optional) create a virtual environment and install from requirements.txt if provided. For example: python -m venv venv source venv/bin/activate pip install -r simple-filesystem-server-python/requirements.txt
  5. Run the servers as described in their respective READMEs within each subdirectory, then use the MCP client to connect and interact with them.

Additional notes

Notes:

  • The exact port and endpoint configurations can be overridden via environment variables (e.g., PORT, MCP_ENDPOINT).
  • Ensure dependencies are installed for each sub-project before starting.
  • The mcp-client-demo can be used to validate connectivity and to enumerate available tools across the MCP servers.
  • If you encounter network issues, check firewall rules and ensure the chosen ports are accessible from your client.
  • This repository is intended for demonstration; for production usage, consider adding authentication, TLS, and proper error handling in each server.

Related MCP Servers

Sponsor this space

Reach thousands of developers