Get the FREE Ultimate OpenClaw Setup Guide →

mcp_server

快速上手MCP

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport http hfhfn-mcp_server http://127.0.0.1:8000/mcp

How to use

This MCP server setup uses Python with the UV tooling to host and manage multiple MCP endpoints. It supports different transport modes for interacting with MCP services, including streamable_http (HTTP-based streaming), and SSE (Server-Sent Events) endpoints. Clients can reference the configured URLs to send requests or subscribe to responses, enabling standard and streaming interactions with individual MCP services. The included examples show both local and remote endpoints, as well as a couple of pre-configured stdio-based servers that run entirely within the host shell or container. To leverage the local stdio-based servers, you can start a server command (for example via the provided quickchart or excel MCP servers) and connect to it using the local command-line runner.

How to install

Prerequisites:

  • Python 3.8+ (or the environment you plan to use) and a Python package manager (pip).
  • uv or uvx installed for managing Python environments and MCP CLI integration.

Installation steps:

  1. Install the MCP CLI tools and environment managers:
    • For uv (standard Python environment management): install via your preferred method, then run the client commands as shown in the README.
    • For uvx (enhanced Python environment with additional features): install via your package manager as needed.
  2. Prepare a project directory and clone or place your mcp_server entry script (e.g., mcp.py) in the project root.
  3. Verify dependencies exist for the MCP server script and its transports (e.g., requests, sseclient, or any other required libraries).
  4. Start the MCP server using the appropriate command shown in the README (e.g., uv run --with mcp[cli] mcp run path/to/mcp.py) or uvx with the equivalent flags.
  5. Confirm the server is listening on the expected ports (e.g., 8000) and that endpoints (sse, mcp) are reachable.

Example quickstart for local development:

Additional notes

Tips and caveats:

  • When using streamable_http or SSE, ensure firewall rules allow the chosen port (default 8000).
  • For remote SSE endpoints, verify authentication headers are provided if required (see the sequentialthinking example).
  • The excel-mcp-server and quickchart-server entries illustrate how to run MCP servers in a local Windows shell via cmd, using npx to install and invoke prebuilt MCP servers. Adjust paths and environment variables as needed for your environment.
  • If working in a container, map port 8000 correctly and ensure the container has network access to the required endpoints.
  • Environment variables like LOG_PATH, CACHE_MAX_AGE, and LOG_RETENTION_DAYS can be tweaked to balance performance and disk usage.

Related MCP Servers

Sponsor this space

Reach thousands of developers