carrot-mcp
AGENTS.md1 starsChanged 5 months agoApache-2.0View on GitHub
Carrot MCP is a collection of MCP (Model Context Protocol) servers for hardware and data interfaces, structured as a UV workspace. CLI commands to manage external agent MCP configurations (claude, mimocode, opencode, gemini):
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Tool Return Convention: All tools return a dict {"status": "ok"|"error", ...}, except tools returning images (which return list[TextContent …
- Very specific: line 39
Documentation SSOT: When modifying tools or signatures, update the corresponding packages/carrot-mcp-<name>/README.md and verify with uv …
- Very specific: line 44
Add pyproject.toml with fastmcp>=0.1.0, scripts entry (carrot-mcp-<name> = "carrot_mcp_<name>.server:main"), and entry point:
- Very specific: line 50
Add src/carrot_mcp_<name>/__main__.py for module execution (python -m carrot_mcp_<name>).
- Very specific: line 51
Add package to root pyproject.toml dependencies and uv.sources.
- Very specific: line 52
Add unit tests under tests/<name>/ (ensure no __init__.py).
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Project Overview
Carrot MCP is a collection of MCP (Model Context Protocol) servers for hardware and data interfaces, structured as a UV workspace.
Project Structure & Navigation
src/carrot_mcp/: Root CLI entry point (cli.py) and agent config managers (claude.py,mimocode.py,opencode.py,gemini.py)packages/carrot-mcp-<name>/: Independent MCP servers (io,pdf,office,nfc,sys)tests/<name>/: Test suites matching each sub-packagetests/test_cli.py,tests/test_agents.py: Root CLI and agent config test suitestests/HIL/: Hardware-in-the-loop tests and verification scripts- Tool Specs & Architecture: Defined in each package's
packages/carrot-mcp-<name>/README.mdandsrc/carrot_mcp_<name>/server.py. Consult them on-demand via search/view tools.
Build & Test Commands
# Dependencies & Testing
uv sync --all-packages
uv run pytest # Run all tests (unit tests)
uv run pytest tests/<name>/ -v # Run specific package tests (e.g. tests/io/)
uv run pytest tests/test_cli.py -v # Run root CLI tests
# Run MCP Servers
uv run carrot-mcp list # List available servers
uv run carrot-mcp run <server> # Run via root CLI (pdf, office, io, nfc, sys)
uv run carrot-mcp-<name> # Run via package script (e.g. carrot-mcp-pdf)
uv run python -m carrot_mcp_<name> # Run package module directlyEngineering Rules & Code Style
- Python 3.10+ (except
carrot-mcp-nfcwhich requires Python 3.14+), strict type hints. - FastMCP Pattern: Each server uses FastMCP (
from fastmcp import FastMCP) inserver.pyand implements aversiontool. - Tool Return Convention: All tools return a dict
{"status": "ok"|"error", ...}, except tools returning images (which returnlist[TextContent | ImageContent]). - Version SSOT: Versions are read dynamically from package metadata via
importlib.metadata.version("<package_name>"). Never hardcode__version__in__init__.py. - CRITICAL Redline:
tests/directories must NOT contain__init__.py— doing so shadows pyserial's top-levelserialpackage. - Documentation SSOT: When modifying tools or signatures, update the corresponding
packages/carrot-mcp-<name>/README.mdand verify withuv run pytest.
Adding a New MCP Server
- Create
packages/carrot-mcp-<name>/. - Add
pyproject.tomlwithfastmcp>=0.1.0, scripts entry (carrot-mcp-<name> = "carrot_mcp_<name>.server:main"), and entry point:[project.entry-points."carrot_mcp.servers"] <name> = "carrot_mcp_<name>.server:mcp" - Implement FastMCP server in
src/carrot_mcp_<name>/server.pywith aversiontool. - Add
src/carrot_mcp_<name>/__main__.pyfor module execution (python -m carrot_mcp_<name>). - Add package to root
pyproject.tomldependencies anduv.sources. - Add unit tests under
tests/<name>/(ensure no__init__.py).
Agent Config Management
CLI commands to manage external agent MCP configurations (claude, mimocode, opencode, gemini):
carrot-mcp list # List available servers
carrot-mcp run <server> # Run a specific MCP server
carrot-mcp mcp add [--uvx|--local] # Register carrot servers with agents
carrot-mcp mcp remove [agent ...] # Unregister carrot servers- Auto-detects
--uvxvs--localmode based on PATH if unspecified. - Preserves existing environment configurations and non-managed / remote MCP servers (
type == "http"or"remote"). - Config backups are saved automatically under
%APPDATA%/carrot-mcp/agents/<agent>/(Windows) or~/.local/share/carrot-mcp/agents/<agent>/(Linux/macOS). - Adding a new agent: Implement
src/carrot_mcp/<agent>.py(is_available,add,remove,list_carrot,list_carrot_local,get_env) and register under[project.entry-points."carrot_mcp.agents"].
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

