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.1

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.1
File Size Uploaded Provenance Actions
mcp_server_core-0.2.1.tar.gz 25.1 kB Without provenance Details for mcp_server_core-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 53.2 kB

Release files / mcp_server_core-0.2.1.tar.gz

Download URL mcp_server_core-0.2.1.tar.gz
Size 25.1 kB
Tags Source
SHA-256 checksum
How to use checksums
74d824452da25554b569c9c85278ae7cd1abc7577d8847db0d7e22db386e66f2
BLAKE2b-256 checksum
How to use checksums
c216b8557b211829b662f339f620518c1f3e0cdd607829833bc199a6d7a1081d
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.1-py3-none-any.whl

Download URL mcp_server_core-0.2.1-py3-none-any.whl
Size 28.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f61f35b9ce6aea32c85a2b6d39ca0bcb5aa515460bdd51ef5527dd1e7cfcdc9
BLAKE2b-256 checksum
How to use checksums
46da6f75038a6b7bfd90c8411d131b7a2584d2ef3a12986853c596fc3baca807
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.1

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