Skip to main content

MCP Server Core 🚀

Universal MCP Server Framework for Streamable HTTP ASGI, Cloudflare Tunnel, OAuth 2.1 & Process Supervisor

Decoupled, reusable transport and lifecycle layer for FastMCP services (e.g. Codexen, Literary Workflow).


📦 Features

  • ASGI Streamable HTTP Transport: Starlette + FastMCP integration supporting SSE, streaming, and atomic JSON-RPC responses.
  • Cache-Busting & Anti-Stale Guarantees: Built-in NoCacheMiddleware ensuring Cache-Control: no-cache, no-store, must-revalidate across all discovery and tool execution routes to prevent intermediate CDN/Cloudflare heuristic caching.
  • Embedded OAuth 2.1 Server: Full RFC 9728 (Protected Resource Metadata), RFC 8414 (Authorization Server Metadata), RFC 7591 (Dynamic Client Registration), and PKCE S256 support for ChatGPT Developer Mode & third-party AI agents.
  • Cloudflare Tunnel Singleton Supervisor: Outbound named tunnel daemon lifecycle management with automated health check and heartbeat recovery.
  • Windows Named Mutex & Process Lifecycle: Prevents duplicate server port bindings, cleans up zombie PIDs, and handles cross-platform single-instance constraints.

🛠️ Installation & Usage

pip install mcp-server-core
# or with uv
uv add mcp-server-core

Or declare in pyproject.toml:

dependencies = [
    "mcp-server-core>=0.2.1",
]

2. Python Code Usage

from mcp_server_core import (
    MCPServer,
    OAuthProvider,
    TunnelManager,
    SingleInstanceManager,
    NoCacheMiddleware,
)

💡 Note: For existing projects, import mcp_framework is fully supported as a backward-compatibility alias forwarding to mcp_server_core.

3. Local Editable Development (Instant Sync across Projects)

In consumer projects (e.g. Codexen or literary-workflow):

uv pip install -e path/to/mcp-framework

Changes made in this repository will instantly reflect across all local consumer services without copying code.


📄 License

MIT License.

Metadata

Release files for mcp-server-core 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-server-core 0.2.3
File Size Uploaded Provenance Actions
mcp_server_core-0.2.3.tar.gz 26.2 kB Without provenance Details for mcp_server_core-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-server-core 0.2.3
File Interpreter ABI Platform Actions
mcp_server_core-0.2.3-py3-none-any.whl Python 3 none any Details for mcp_server_core-0.2.3-py3-none-any.whl

Total release size: 55.6 kB

Release files / mcp_server_core-0.2.3.tar.gz

Download URL mcp_server_core-0.2.3.tar.gz
Size 26.2 kB
Tags Source
SHA-256 checksum
How to use checksums
56b33d5126d2ee6368303614da6a32829e4263329fadb5a2090be555dd5c4669
BLAKE2b-256 checksum
How to use checksums
89cafa4ad380060ff51172dd3ca41c9e21ed403301c55b22d75c779d0cc4209c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / mcp_server_core-0.2.3-py3-none-any.whl

Download URL mcp_server_core-0.2.3-py3-none-any.whl
Size 29.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4662c0e56fa3589fce7aa956e0089e4e66b154b14eb41d0a819e4e219894295
BLAKE2b-256 checksum
How to use checksums
0048c3596a161b6bfad652c5555c4864006a5b619a4593195ce4030e114c716f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for mcp-server-core 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page