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:
- Update
versioninpyproject.toml - 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
Metadata
Release files for speculate-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| speculate_mcp-0.2.0.tar.gz | 4.9 kB | With provenance | Details for speculate_mcp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| speculate_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for speculate_mcp-0.2.0-py3-none-any.whl |
Total release size: 10.7 kB
Release files / speculate_mcp-0.2.0.tar.gz
| Download URL | speculate_mcp-0.2.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
483f829aa1ecf77f062d8279b6b44333b4fdad3024f1a2ba09e6e10671f27331
|
|
BLAKE2b-256 checksum How to use checksums |
81eeba0215a2f4d7dc3ff3b253a11eb362b339ca968a4522ad16660cb2687fa7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 16, 2026.
Transparency logRelease files / speculate_mcp-0.2.0-py3-none-any.whl
| Download URL | speculate_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31eff6db80d6f867c76408d5c1ab0640486c6d63b17c730d7bfc881a4f887c3d
|
|
BLAKE2b-256 checksum How to use checksums |
c8b0f5e89956ac4f9141991c7f45f717fdaf260edfa4d015be46faf33617751c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 16, 2026.
Transparency logSecurity for speculate-mcp 0.2.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
Both files in this release have been uploaded with provenance metadata.
Attestation for speculate_mcp-0.2.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 May 16, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.