Skip to main content

MCP server for any OpenAPI-described API — resolve, search, and execute

Project description

speculate-mcp

MCP server for any OpenAPI-described API. Gives AI agents the ability to resolve, explore, and execute calls against any REST API with an OpenAPI spec — without writing custom integration code.

What it does

Five tools, covering the full integration loop:

Tool What it does
resolve_spec Load any API by name ("Stripe"), doc URL, or direct spec URL
describe_auth Return exact auth headers, OAuth2 flows, and credential instructions
search_endpoints Find relevant endpoints with a natural language query
get_endpoint_schema Return path params, body fields, types, enums, and required flags
execute_call Execute a live API call and return the response

Install

The recommended way — no global install needed:

uvx speculate-mcp

Or install globally:

pip install speculate-mcp
# or
uv tool install speculate-mcp

Configure your AI IDE

Claude Code (~/.claude.json or project .claude/settings.json)

{
  "mcpServers": {
    "speculate": {
      "command": "speculate-mcp",
      "env": {
        "SPECULATE_API_KEY": "your-key-here"
      }
    }
  }
}

Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "speculate": {
      "command": "speculate-mcp",
      "env": {
        "SPECULATE_API_KEY": "your-key-here"
      }
    }
  }
}

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "speculate": {
      "command": "speculate-mcp",
      "env": {
        "SPECULATE_API_KEY": "your-key-here"
      }
    }
  }
}

Get your API key at speculateapi.dev. Free tier works without a key (rate-limited).

Usage example

Once connected, your agent can do things like:

Load the Stripe API, find the endpoint to create a payment intent,
and make a test call with amount=1000, currency=usd.

The agent will call resolve_spec("stripe"), then search_endpoints(...), then execute_call(...) — all automatically.

Environment variables

Variable Default Description
SPECULATE_API_URL https://mcp.speculateapi.dev Backend URL (for self-hosted deployments)
SPECULATE_API_KEY (empty) Your Speculate API key
MCP_TRANSPORT stdio Set to http to run as an HTTP server instead of stdio
PORT 8080 Port to listen on when MCP_TRANSPORT=http

Self-hosting

Run the backend yourself:

cd backend
cp .env.example .env
# Set OPENAI_API_KEY in .env
uv run uvicorn app.main:app --host 0.0.0.0 --port 8000

Then point the MCP server at your instance:

SPECULATE_API_URL=http://localhost:8000 speculate-mcp

Publishing to PyPI

Releases are automated via GitHub Actions. To publish a new version:

  1. Update version in pyproject.toml
  2. Tag and push:
    git tag mcp-v0.3.0
    git push --tags
    

The publish-mcp.yml workflow builds and publishes via PyPI trusted publishing (no stored secret needed — requires a configured PyPI environment named pypi).

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

speculate_mcp-0.2.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

speculate_mcp-0.2.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file speculate_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: speculate_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for speculate_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 483f829aa1ecf77f062d8279b6b44333b4fdad3024f1a2ba09e6e10671f27331
MD5 36a000e242f12452f9417acb54dbf174
BLAKE2b-256 81eeba0215a2f4d7dc3ff3b253a11eb362b339ca968a4522ad16660cb2687fa7

See more details on using hashes here.

Provenance

The following attestation bundles were made for speculate_mcp-0.2.0.tar.gz:

Publisher: publish-mcp.yml on mgalobll/speculate-app

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file speculate_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: speculate_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for speculate_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31eff6db80d6f867c76408d5c1ab0640486c6d63b17c730d7bfc881a4f887c3d
MD5 75603a3b99c425bb1573773ddec287c5
BLAKE2b-256 c8b0f5e89956ac4f9141991c7f45f717fdaf260edfa4d015be46faf33617751c

See more details on using hashes here.

Provenance

The following attestation bundles were made for speculate_mcp-0.2.0-py3-none-any.whl:

Publisher: publish-mcp.yml on mgalobll/speculate-app

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page