License: MIT Build Status Code Style: Ruff MCP Compliant Built for Antigravity
The Standard Library for the Agentic Web.
https://protocolbox.in
ProtocolBox is a collection of high-reliability MCP (Model Context Protocol) tools designed for AI Agents. It provides verified, token-efficient utilities that work out-of-the-box with Claude, Gemini, and other MCP-compliant agents.
pip install protocolbox
Initialize the configuration for your agent:
protocolbox init
ProtocolBox currently exports 8 tools optimized for agent workflows:
| Tool | Signature | Description |
|---|---|---|
| Scrape | scrape(url: str) -> str |
Fetches a webpage and converts it to clean, token-saving Markdown. Removes ads, scripts, and clutter automatically. |
| Heal JSON | heal_json(json_str: str) -> dict |
Repairs malformed JSON strings often produced by LLMs (trailing commas, missing quotes, etc.) into valid Python dictionaries. |
| Web Search | web_search(query: str, max_results: int) -> str |
Privacy-focused web search using DuckDuckGo. Returns formatted Markdown results. |
| Safe Math | safe_math(expression: str) -> str |
Securely evaluates mathematical expressions without eval(). Supports arithmetic and common math functions. |
| Get Time | get_time(timezone: str) -> str |
Returns the current real-world time in any timezone (ISO 8601 format). |
| Get Transcript | get_transcript(video_url: str) -> str |
Fetches the English transcript of a YouTube video as clean text. |
| Remember | remember(key: str, value: str) -> str |
Stores a key-value pair in persistent local memory. |
| Recall | recall(key: str) -> str |
Retrieves a value from persistent local memory by key. |
Start the MCP server to expose these tools to your agent:
protocolbox start
Or using uv:
uv run protocolbox start
protocolbox/
βββ src/protocolbox/ # Core package
β βββ server.py # FastMCP server
β βββ cli.py # CLI entry point
β βββ tools/ # Tool implementations
β βββ scraper.py # scrape()
β βββ json_healer.py# heal_json()
β βββ search.py # web_search()
β βββ math_utils.py # safe_math()
β βββ time_utils.py # get_time()
β βββ youtube.py # get_transcript()
β βββ memory.py # remember() + recall()
βββ tests/ # 280+ edge-case tests
βββ docs/ # Documentation site
βββ pyproject.toml # Project config
We recommend uv for a fast, reliable dev environment.
# Clone and setup git clone https://github.com/ianuragbhatt/protocolbox.git cd protocolbox uv pip install -e ".[dev]" # Run tests (100% pass rate required) pytest tests/ -v # Linting ruff check .
We welcome contributions! Please see CONTRIBUTING.md for details on how to add new tools.
Maintainer: Anurag Bhatt (@ianuragbhatt)
MIT Β© 2026 ProtocolBox.