Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

mcpstat

Latest version: v0.3.1

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
MCP server Transport: stdio Publisher: tekkidev
6 Stars
1 Forks
2 Versions
Python Repo language

Scan summary

mcpstat was last scanned on 23 Nov 2026 at version 0.3.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions; the latest was published on 23 Nov 2026.
  • Findings: No rules fired in version 0.3.1.
  • MCP server: Runs over stdio.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.3.1 LATEST 23 Nov 2026 No rules fired
0.3.0 16 Nov 2026 No rules fired

No rules fired in 0.3.1

Findings

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.

README

The publisher’s own README, as collected from the registry.

mcpstat

PyPI - Version GitHub License PyPI - Python Version GitHub Actions Workflow Status PyPI - Downloads Checked with mypy Security: bandit

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.

Installation

pip install mcpstat
pip install "mcpstat[server]"  # Includes the SDK for the example below

Quick Start

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.

Choose Your Integration

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.

Features

  • SQLite-backed - Stats persist across restarts
  • Built-in MCP tools - get_tool_usage_stats, get_tool_catalog
  • Tag system - Categorize and filter tools
  • Token tracking - Estimate or record actual token usage
  • Latency tracking - Measure execution duration, identify slow tools
  • File logging - Optional timestamped audit trail
  • Async-first - Database operations run in worker threads with serialized transactions

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

Documentation

Full Documentation - Quick start, API reference, examples

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.

Contributing

See CONTRIBUTING.md. From a repository checkout, run tests with:

python -m pip install -e ".[dev]"
python -m pytest tests/

License

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.

OX Radar and Response Center

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.

Where it’s listed

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

  • MCP Registry io.github.tekkidev/mcpstat

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

PHP2Shell, Day 5 93.6% of Measurable Instances Still Unpatched (1)
Vulnerability Insights

PHP2Shell, Day 5: The Panic Hasn’t Turned Into Patching

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Frame 2085668439 (1)
Group 1261154229