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:
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
483f829aa1ecf77f062d8279b6b44333b4fdad3024f1a2ba09e6e10671f27331
|
|
| MD5 |
36a000e242f12452f9417acb54dbf174
|
|
| BLAKE2b-256 |
81eeba0215a2f4d7dc3ff3b253a11eb362b339ca968a4522ad16660cb2687fa7
|
Provenance
The following attestation bundles were made for speculate_mcp-0.2.0.tar.gz:
Publisher:
publish-mcp.yml on mgalobll/speculate-app
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
speculate_mcp-0.2.0.tar.gz -
Subject digest:
483f829aa1ecf77f062d8279b6b44333b4fdad3024f1a2ba09e6e10671f27331 - Sigstore transparency entry: 1552251700
- Sigstore integration time:
-
Permalink:
mgalobll/speculate-app@7c834c14a82b9906d4a08f6a07e3500192800e93 -
Branch / Tag:
refs/tags/mcp-v0.2.0 - Owner: https://github.com/mgalobll
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-mcp.yml@7c834c14a82b9906d4a08f6a07e3500192800e93 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31eff6db80d6f867c76408d5c1ab0640486c6d63b17c730d7bfc881a4f887c3d
|
|
| MD5 |
75603a3b99c425bb1573773ddec287c5
|
|
| BLAKE2b-256 |
c8b0f5e89956ac4f9141991c7f45f717fdaf260edfa4d015be46faf33617751c
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
speculate_mcp-0.2.0-py3-none-any.whl -
Subject digest:
31eff6db80d6f867c76408d5c1ab0640486c6d63b17c730d7bfc881a4f887c3d - Sigstore transparency entry: 1552251705
- Sigstore integration time:
-
Permalink:
mgalobll/speculate-app@7c834c14a82b9906d4a08f6a07e3500192800e93 -
Branch / Tag:
refs/tags/mcp-v0.2.0 - Owner: https://github.com/mgalobll
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-mcp.yml@7c834c14a82b9906d4a08f6a07e3500192800e93 -
Trigger Event:
push
-
Statement type: