Skip to main content

thodr-mcp

A local MCP (Model Context Protocol) server that lets an AI coding assistant (Cursor, Claude Desktop, GitHub Copilot, or any MCP-compatible IDE) create and manage Thodr mock API projects and endpoints on your behalf, by forwarding tool calls to Thodr's existing management REST API.

This server is not an AI model. It does not run any inference itself — it is a thin, local process that validates inputs and makes REST calls to THODR_API_URL using your personal access token. The IDE/agent supplies the model; this server just exposes 5 specific tools that wrap Thodr's projects/routes API. It does not "understand" OpenAPI specs, generate mock data, or do anything beyond what each tool's description says.

Getting a THODR_TOKEN

Thodr authenticates management API calls (and this server) with a Personal Access Token (PAT).

  1. Log in to the Thodr web app and go to Settings → Access Tokens.
  2. Give the token a name (e.g. my-ide) and click Generate.
  3. Copy the token shown in the amber box (it looks like thodr_pat_...). It is shown once and cannot be retrieved again — store it securely (e.g. your OS keychain or IDE's secret storage).

Prefer the API instead? While logged in, call POST {THODR_API_URL}/auth/tokens with your session's bearer (JWT) token and a JSON body {"name": "my-ide"}:

curl -X POST https://thodr.com/api/auth/tokens \
  -H "Authorization: Bearer <your-jwt-from-the-logged-in-session>" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-ide"}'

IDE configuration

Add an MCP server entry to your IDE's MCP config. The exact file location differs by client — check your client's own MCP documentation (e.g. Cursor's or Claude Desktop's settings docs) for where this JSON block goes:

{
  "mcpServers": {
    "thodr": {
      "command": "uvx",
      "args": ["thodr-mcp"],
      "env": {
        "THODR_API_URL": "https://thodr.com/api",
        "THODR_TOKEN": "thodr_pat_xxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

If THODR_TOKEN is missing or empty, the server fails fast at startup with a clear error on stderr instead of failing confusingly on the first tool call.

The 5 tools

This is a read + create only v1 — there are no delete tools. Manage deletion (or anything else not listed below) from the Thodr web app.

Tool Description
create_project(name, description?) Creates a new Thodr mock API project. Returns its id, name, slug, and mock_base_url.
list_projects() Lists your Thodr projects, each with id, name, slug, route count, and mock_base_url.
add_endpoint(project_id, method, path_pattern, response_status=200, response_body?, content_type="application/json", response_headers?, delay_ms=0) Adds a mock endpoint (route) to a project. Returns the created route and its full live mock URL.
list_endpoints(project_id) Lists the mock endpoints (routes) for a project, each with its live mock URL.
get_mock_url(project_slug, path_pattern, env_slug?) Pure string composition of the live mock URL for a project/path. Makes no network call.

Cost and privacy

  • $0 to run. This server does no AI inference — it's a local process that makes plain REST calls within your existing Thodr plan's limits.
  • Your THODR_TOKEN is sent only to THODR_API_URL as an Authorization: Bearer header. It is never logged, printed, or included in any error message this server produces.

Local development

cd mcp-server
python3 -m venv .venv && source .venv/bin/activate   # or: virtualenv -p python3.12 .venv
pip install -e ".[dev]"
pip install pytest pytest-asyncio respx   # if the [dev] extra doesn't pull these in on your pip version
pytest tests/ -v
python -m thodr_mcp

Metadata

Release files for thodr-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thodr-mcp 0.1.0
File Size Uploaded Provenance
thodr_mcp-0.1.0.tar.gz 15.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for thodr-mcp 0.1.0
File Interpreter ABI Platform
thodr_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.5 kB

Release files / thodr_mcp-0.1.0.tar.gz

Download URL thodr_mcp-0.1.0.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b6ee7f5e3bc6cf82faa5f6b50e0a5d5e3a3c4318802d20899900be4b8e6bb05a
BLAKE2b-256 checksum
How to use checksums
d122b7d42e6cfd599c53a1649cc022037397b19a0c0f338207fe5d0cb47b329e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / thodr_mcp-0.1.0-py3-none-any.whl

Download URL thodr_mcp-0.1.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
702c78c8fd7a817c3e65fa893fd19dc7e32f5c9a50fc78da6aacdf8029a791e0
BLAKE2b-256 checksum
How to use checksums
9791716f3fe389c335ad2bcb0cb5c6135fe4e4a1307aea3a847840327453ab45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for thodr-mcp 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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for thodr_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page