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
NoCacheMiddlewareensuringCache-Control: no-cache, no-store, must-revalidateacross 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
1. From PyPI (Recommended for Production)
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_frameworkis fully supported as a backward-compatibility alias forwarding tomcp_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.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_server_core-0.3.0.tar.gz | 32.4 kB | Without provenance | Details for mcp_server_core-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_server_core-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for mcp_server_core-0.3.0-py3-none-any.whl |
Total release size: 69.7 kB
Release files / mcp_server_core-0.3.0.tar.gz
| Download URL | mcp_server_core-0.3.0.tar.gz |
|---|---|
| Size | 32.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
231da37d1b9fb3a70a724d30d4781ff51663fc41093ac62d894b7485a6ac5e73
|
|
BLAKE2b-256 checksum How to use checksums |
8a116ab326f3d12688a8f90ebfa6bb3be5ce8dc876517dae07badf93a651da2d
|
| 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.3.0-py3-none-any.whl
| Download URL | mcp_server_core-0.3.0-py3-none-any.whl |
|---|---|
| Size | 37.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b0168b576d3282df73225a218bc95c27ea7077260e97bd0a35f0974a1831502
|
|
BLAKE2b-256 checksum How to use checksums |
cd440139123d2341388cd767a57a8608e4f50d089f5bd5cbee2c08cf17287378
|
| 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.3.0
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.