mcp-tokens
Verified Safeby sd2k
Overview
Analyzes the token usage of Model Context Protocol (MCP) servers to help authors understand, track, and optimize context window consumption for AI models.
Installation
mcp-tokens analyze -- npx @modelcontextprotocol/server-everythingEnvironment Variables
- ANTHROPIC_API_KEY
- MCP_TOKENS_PROVIDER
- MCP_TOKENS_MODEL
Security Notes
The tool is designed to execute user-provided commands to start target MCP servers, which inherently carries a risk if a malicious command is supplied by the user. However, this is part of its intended functionality to analyze local or remote MCP servers. External network requests are made to the Anthropic API for accurate token counting, using an API key managed via environment variables or CLI arguments. The source code does not contain 'eval' or similar dynamic code execution patterns, nor any hardcoded secrets. The `mcp-tokens` tool itself does not expose any network services.
Similar Servers
mcp-interviewer
A Python CLI tool to evaluate Model Context Protocol (MCP) servers for agentic use-cases, by inspecting capabilities, running functional tests, and providing LLM-as-a-judge evaluations.
ncp
NCP acts as a universal adapter and orchestrator for Model Context Protocol (MCP) servers and tools. It provides a unified interface for discovery, execution, and management of diverse tools (local CLI, HTTP APIs, internal plugins/Photons, AI skills) through natural language and structured code interaction, enabling AI agents to interact with the broader digital ecosystem.
mcp-framework
A Rust framework for building AI agents with built-in Model Context Protocol (MCP) support, multi-LLM integration, and a web-based inspector for debugging.
Ops-Tools
A Rust-based command-line interface (CLI) toolset designed for DevOps workflows, offering features like infrastructure-as-code cache cleanup, AI code assistant management, system package installation, security scanning, LLM prompt generation, container image building, and Kubernetes configuration management.