Install
$ agentstack add mcp-tekkidev-mcpstat ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
mcpstat
[](https://pypi.org/project/mcpstat/) [](https://github.com/tekkidev/mcpstat/blob/main/LICENSE) [](https://pypi.org/project/mcpstat/) [](https://github.com/tekkidev/mcpstat/actions/workflows/tests.yaml) [](https://pypistats.org/packages/mcpstat) [](http://mypy-lang.org/) [](https://github.com/PyCQA/bandit) [](https://codecov.io/gh/tekkidev/mcpstat)
Usage tracking and analytics for MCP servers. Pure Python, zero required dependencies.
Track which tools get called, how often, and keep an audit trail - all in 3 lines of code.
Installation
pip install mcpstat
With MCP SDK:
pip install "mcpstat[mcp]"
Quick Start
from mcp.server import Server
from mcpstat import MCPStat
app = Server("my-server")
stat = MCPStat("my-server")
@app.call_tool()
@stat.track # ← One decorator does everything!
async def handle_tool(name: str, arguments: dict):
# Your logic here - latency tracked automatically
return await my_logic(arguments)
Then ask your AI assistant: "Give me MCP usage stats"
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 - Thread-safe via
asyncio.Lock
Documentation
Full Documentation - Quick start, API reference, examples
- Quick Start - Get running in 5 minutes
- Configuration - Customize paths, logging, presets
- API Reference - Complete method reference
- Token Tracking - Cost analysis features
- Latency Tracking - Performance monitoring
Examples
# Clone and run example server
git clone https://github.com/tekkidev/mcpstat.git
cd mcpstat
pip install -e ".[mcp]"
python examples/example_server.py
See examples/ for minimal and full integration patterns.
Contributing
See CONTRIBUTING.md. Run tests with:
pip install "mcpstat[dev]"
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.
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: tekkidev
- Source: tekkidev/mcpstat
- License: MIT
- Homepage: https://mcpstat.vadim.dev
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.