mcp_server
快速上手MCP
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:
- 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.
- Prepare a project directory and clone or place your mcp_server entry script (e.g., mcp.py) in the project root.
- Verify dependencies exist for the MCP server script and its transports (e.g., requests, sseclient, or any other required libraries).
- 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.
- Confirm the server is listening on the expected ports (e.g., 8000) and that endpoints (sse, mcp) are reachable.
Example quickstart for local development:
- Install MCP CLI: uv add "mcp[cli]"
- Run the server: uv run --with mcp[cli] mcp run path/to/mcp.py
- Access configured endpoints at http://127.0.0.1:8000/sse or http://127.0.0.1:8000/mcp depending on the transport.
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
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP