mcp-diet
CLI tool that analyzes MCP servers and shows how much of your AI agent's context window each tool consumes, then grades efficiency.
Install
pip install mcp-diet
# or
uvx mcp-diet
Usage
# Analyze a running MCP server via stdio
mcp-diet analyze -- npx @modelcontextprotocol/server-filesystem /tmp
# Analyze via SSE
mcp-diet analyze --sse http://localhost:3000/sse
# Auto-detect from Claude config (.mcp.json or ~/.claude/settings.json)
mcp-diet auto
# Output formats
mcp-diet analyze --format json -- npx @modelcontextprotocol/server-filesystem /tmp
mcp-diet analyze --format markdown -- npx @modelcontextprotocol/server-filesystem /tmp
# Optimization suggestions
mcp-diet suggest -- npx @modelcontextprotocol/server-filesystem /tmp
What it shows
For each tool in the MCP server:
| Column | Description |
|---|---|
| Tool name | The tool's registered name |
| Tokens | Estimated token count of the full tool definition |
| % of budget | Percentage of a configurable context budget (default: 200k) |
| Schema depth | Max nesting depth of the JSON schema |
| Desc length | Character count of the description |
| Grade | A-F rating based on token efficiency |
Grading
| Grade | Tokens per tool |
|---|---|
| A | < 200 |
| B | 200-500 |
| C | 500-1000 |
| D | 1000-2000 |
| F | > 2000 |
Metadata
Release files for mcp-diet 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_diet-0.1.0.tar.gz | 13.2 kB | Without provenance | Details for mcp_diet-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_diet-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mcp_diet-0.1.0-py3-none-any.whl |
Total release size: 22.9 kB
Release files / mcp_diet-0.1.0.tar.gz
| Download URL | mcp_diet-0.1.0.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15c1d7a905a78760dac27e5014a7a6c1e2794df8ef3c97703a0bdd56d0a630d7
|
|
BLAKE2b-256 checksum How to use checksums |
1049f0590b40fe816a48ee004742ccdc4b98311646c577432921e88f62470d40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.3
|
Release files / mcp_diet-0.1.0-py3-none-any.whl
| Download URL | mcp_diet-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54a041039bf91681456702dde166c14c13147466a5650d7b7247cb1af116dd4a
|
|
BLAKE2b-256 checksum How to use checksums |
4f7093cdae05fc38b5addd2666f8a9a19c5eef84e886263fa7a70ce1ed5aed4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.3
|
Security for mcp-diet 0.1.0
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.