YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

mcptr

Point it at an MCP server, get a directory tree. Tools become executable commands; resources and skills become plain files you can cat, grep, and diff. One Python file, standard library only β€” no FUSE, no mount, so it works in sandboxes, CI, and anywhere /dev/fuse doesn't exist.

$ python3 mcptr.py https://developers.openai.com/mcp -o docs
$ ls docs/tools
fetch_openai_doc  get_openapi_spec  list_api_endpoints  list_openai_docs  search_openai_docs
$ docs/tools/search_openai_docs --query 'Responses API streaming' --limit 1
{"hits":[{"url":"https://developers.openai.com/api/docs/guides/streaming-responses", …

Requires Python 3. Nothing to install.

What you get

mcptr performs the MCP initialize handshake once, walks the server's catalog, and writes a snapshot to the output directory. Example, from python3 mcptr.py (which defaults to the Context7 server):

context7-out/
β”œβ”€β”€ tools/
β”‚   β”œβ”€β”€ query-docs            # executable: calls the tool
β”‚   └── resolve-library-id    # executable: calls the tool
β”œβ”€β”€ resources/
β”‚   └── skill/context7-mcp/SKILL.md
β”œβ”€β”€ skills/
β”‚   └── context7-mcp/SKILL.md # saved only after size/SHA-256 verification
└── .mcptr/
    β”œβ”€β”€ mcptr.py              # a copy of mcptr itself (the tools import this)
    β”œβ”€β”€ server.json           # the initialize result
    β”œβ”€β”€ tools.json            # raw catalogs, for grep and diff
    β”œβ”€β”€ resources.json
    └── skills.json

Which directories appear depends on what the server advertises: a tools-only server produces just tools/. The output directory is self-contained β€” the generated tool scripts import the copy of mcptr.py in .mcptr/, so the tree keeps working if you move it elsewhere.

Usage

Materialize a server (the URL defaults to https://mcp.context7.com/mcp):

$ python3 mcptr.py [URL] -o OUTDIR [--force] [--timeout SEC]

Run a tool. Named options are converted to the types in the tool's input schema; arrays repeat or take JSON; --help prints the tool's description and schema:

$ docs/tools/search_openai_docs --query 'streaming' --limit 3
$ docs/tools/resolve-library-id --libraryName react --query 'hooks'

Or pass arguments as a JSON object on stdin, with no named options:

$ echo '{"libraryName": "react", "query": "hooks"}' | context7-out/tools/resolve-library-id

Refresh a snapshot by materializing again with --force. mcptr refuses to overwrite a non-empty directory it did not create.

Environment variables:

  • MCPTR_BEARER_TOKEN β€” if set, sent as Authorization: Bearer …. The value is read at run time and never written to disk.
  • MCPTR_RAW=1 β€” generated tools print the raw tools/call result as JSON instead of the extracted text content.

Exit codes: 0 success, 1 partial failure (some items could not be fetched; each is logged), 2 fatal failure (connection, initialize, or bad arguments). A failed run never pretends to have succeeded.

How it differs from mcpfs

OpenAI's mcpfs mounts MCP servers as a live filesystem over FUSE (or virtio-fs for VM guests). mcptr was inspired by it, but is an independent implementation with the opposite trade-off: instead of a live mount it writes a snapshot of plain files, which needs no kernel support at all. The snapshot goes stale as the server changes; re-run mcptr to refresh it β€” the same point at which mcpfs would need a remount.

Limitations

  • Streamable HTTP servers only. stdio (local process) servers are not supported.
  • Handshake-era protocol only: initialize-based versions 2025-03-26 through 2025-11-25. Servers that accept only the newer handshake-less protocol will fail at initialize (exit code 2).
  • No OAuth. The only authentication is the optional bearer token above.
  • No retries. A dropped connection fails that item (exit code 1) or the run (exit code 2); re-running is the retry.
  • Resource templates are saved as JSON under .mcptr/, not expanded. Prompts, sampling, and elicitation are not handled.
  • Each generated-tool invocation performs its own initialize β†’ call β†’ close sequence, so per-call latency is higher than a persistent client.

Safety

Only point mcptr at MCP servers you trust. Materializing a server reads its catalog immediately, and the generated tool scripts run with your credentials and environment when you execute them.

License

Apache License 2.0.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support