Scan your whole stack
Latest version: v0.3.1
mcpstat was last scanned on 23 Nov 2026 at version 0.3.1. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.3.1 LATEST | 23 Nov 2026 | No rules fired |
| 0.3.0 | 16 Nov 2026 | No rules fired |
Findings for v0.3.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.3.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Python observability and usage analytics for MCP (Model Context Protocol) servers.
Track tool, prompt, and resource calls, successful and failed invocations, and execution latency in local SQLite storage. Add tracking to your existing Python MCP server and expose its statistics as MCP tools that an assistant can query. Optional file logging provides an audit trail.
pip install mcpstat
pip install "mcpstat[server]" # Includes the SDK for the example below
from mcp.server import MCPServer
from mcpstat import MCPStat, disable_sdk_tracing
app = MCPServer("my-server")
disable_sdk_tracing(app)
stat = MCPStat("my-server")
@app.tool()
@stat.track(name="echo")
async def echo(message: str) -> str:
"""Return a message, tracking usage and latency automatically."""
return message
@app.tool()
async def get_tool_usage_stats() -> dict:
"""Return cumulative MCP usage statistics."""
return await stat.get_stats()
if __name__ == "__main__":
try:
app.run()
finally:
stat.close()
Connect your assistant to this server, then ask: "Give me MCP usage stats"
For a complete request-to-statistics example, follow the weather server walkthrough. It demonstrates successful calls, an intentional failure, unused tools, and statistics that persist after restarting the server.
| Use case | Installation | What it tracks |
|---|---|---|
| Add tracking to an existing Python server | pip install mcpstat |
The handlers you instrument with the SDK-independent library; keep your server's MCP SDK installed separately. |
| Run the bundled documentation and demonstration server | pip install "mcpstat[server]" |
Its own temperature conversion tools and other registered handlers. |
The decorator records usage; register a statistics tool such as get_tool_usage_stats
to query that data from Claude Code, VS Code, or another MCP client. The standalone
server does not automatically observe other MCP servers.
Use mcpstat for Visual Studio Code to view calls, errors, latency and handler usage. Your server records the statistics. The extension reads them through VS Code's MCP tools, an HTTP endpoint, or directly from a SQLite database.
get_tool_usage_stats, get_tool_catalogInstall mcpstat for the SDK-independent tracking library. The [server] extra includes
the SDK and the runnable mcpstat documentation and demonstration server. The standalone
server tracks its own calls; integrate the library into each server you want to monitor.
Full Documentation - Quick start, API reference, examples
# Clone and run example server
git clone https://github.com/tekkidev/mcpstat.git
cd mcpstat
pip install -e ".[dev]"
python examples/example_server.py
See examples/ for minimal and full integration patterns.
See CONTRIBUTING.md. From a repository checkout, run tests with:
python -m pip install -e ".[dev]"
python -m pytest tests/
MIT - see LICENSE for details.
MCP is a trademark of its respective owners. This project is not affiliated with or endorsed by any trademark holders.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.