Skip to main content

mcp-monitor-sdk

Hosted monitoring SDK for Python MCP servers. User guide · Developer guide

Repo copies: USER.md · DEV.md

User guide

Create a server and API key at https://mcp-moniter.vercel.app/. Wrap your FastMCP server with this package. Tool-call metrics (name, duration, success/error) are batched and sent to the hosted API. They are not application logs. Open the same dashboard to see metrics and analytics for that key’s server.

pip install mcp-monitor-sdk
from mcp_monitor_sdk import MonitoredFastMCP

server = MonitoredFastMCP(
    "todo-mcp",
    api_key="replace-with-a-64-character-or-longer-api-key",
)

@server.tool()
def todos_list() -> str:
    """List all todos."""
    return "No todos."

if __name__ == "__main__":
    server.run()

Omit metrics_server_url in production. Default ingest is https://mcp-metrics-server.just-a-dev.workers.dev/v1/metrics.

Developer guide

Same payload as the JS SDK. Built to sit next to the official mcp package.

When developing this repo against a local API:

server = MonitoredFastMCP(
    "todo-mcp",
    api_key="replace-with-a-64-character-or-longer-api-key",
    metrics_server_url="http://localhost:8000/v1/metrics",
)

Options

Option Required Default Notes
api_key yes Min 64 characters; sent as X-API-Key
metrics_server_url no Workers /v1/metrics Full ingest URL
batch_size no 10 Max 100
retry_attempts no 2 0 still tries once
timeout_ms no 5000
flush_interval_ms no 5000
log_level no info debug | info | warn | error | silent

Failed flushes are restored to the buffer. Process exit drains remaining events over a sync HTTP POST. Body is a JSON array of events.

Local checkout:

pip install -e ./cloud/sdk/py

Publish:

cd cloud/sdk/py
python -m build
twine upload dist/*

Metadata

Release files for mcp-monitor-sdk 0.1.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-monitor-sdk 0.1.1
File Size Uploaded Provenance Actions
mcp_monitor_sdk-0.1.1.tar.gz 7.8 kB Without provenance Details for mcp_monitor_sdk-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-monitor-sdk 0.1.1
File Interpreter ABI Platform Actions
mcp_monitor_sdk-0.1.1-py3-none-any.whl Python 3 none any Details for mcp_monitor_sdk-0.1.1-py3-none-any.whl

Total release size: 18.6 kB

Release files / mcp_monitor_sdk-0.1.1.tar.gz

Download URL mcp_monitor_sdk-0.1.1.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
85de427ac2072ce094ae1cbbd30cc5fef570526f6125d1a695bd099800050411
BLAKE2b-256 checksum
How to use checksums
454a74e90574efd267d363ec6a7e23cc616bb0fecb7bee982a1e503679529d99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / mcp_monitor_sdk-0.1.1-py3-none-any.whl

Download URL mcp_monitor_sdk-0.1.1-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69dd6a466d5d4de7dac32c2d3d08a7e76fc2a02829b762f10a0550892f7f03bf
BLAKE2b-256 checksum
How to use checksums
fd7c2656c33e2cb6406b19ce7ab29d63c9530f097b57b1211d68ca3e1f521bda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for mcp-monitor-sdk 0.1.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