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

Events flush when the batch is full or every flush_interval_ms. Failed flushes are restored. Shutdown drains remaining events. 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.2

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.2
File Size Uploaded Provenance Actions
mcp_monitor_sdk-0.1.2.tar.gz 7.8 kB Without provenance Details for mcp_monitor_sdk-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 18.6 kB

Release files / mcp_monitor_sdk-0.1.2.tar.gz

Download URL mcp_monitor_sdk-0.1.2.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8204aefabb5b9690622a8878a3e6edb3e478b112c9d2949ad2cecad5d1389fc8
BLAKE2b-256 checksum
How to use checksums
4a2a8657524e30c66f8a91cdd61a95dac4f5307be55cc17c83e91323cfaf6d8d
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.2-py3-none-any.whl

Download URL mcp_monitor_sdk-0.1.2-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06d9f034e4536916495ea8af260f8f2b70814aabdae20dea961aa8d6351ea0c6
BLAKE2b-256 checksum
How to use checksums
c7012b168f9a7a02fb10f96aee8a31a8215a6f4a985ff73b305dd14ea7b383d0
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.2

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