Automatically discover and document web application APIs
Project description
Install · Why Spectral · How it works · Documentation · Website
AI agents shouldn't need a browser. Mobile and web apps talk to APIs all day — Spectral gives that same access to your AI agents.
Why Spectral
Most apps — web, mobile, desktop — sit on top of undocumented HTTP APIs. Spectral records the traffic while you browse, uses an LLM to understand what each call does, and generates MCP tools that any AI agent can call.
-
Works everywhere. Websites, mobile apps (Android), desktop apps, CLI tools — if it speaks HTTPS, Spectral can capture it.
-
Understands what you do, not just what the network sends. Spectral correlates your clicks and navigation with API calls to figure out the business meaning of each endpoint — not just its shape.
-
Tools that fix themselves. When a generated tool fails at runtime, the MCP server feeds the error back to an LLM and patches the tool automatically.
-
LLM at build time, not at runtime. The LLM is only used during analysis and self-repair. Once your tools work, every call is a direct HTTP request — fast, cheap, and deterministic.
-
Faster than browser automation. No headless browser, no fragile selectors, no waiting for pages to render. Spectral tools call the API directly, which is orders of magnitude faster and more reliable than controlling a browser with an agent.
-
Also generates API specs. Beyond MCP tools, Spectral can produce OpenAPI 3.1 specs from REST traffic and GraphQL SDL schemas from GraphQL traces — useful for documentation, code generation, or feeding other tools.
Install
The install script sets up Spectral, installs shell completions, and ensures your PATH is configured:
curl -LsSf https://getspectral.sh/install.sh | bash
If you prefer managing packages yourself, you can install directly with pip or uv — but you will need to set up shell completions manually:
pip install spectral-mcp
# or
uv tool install spectral-mcp
You also need an Anthropic API key — Spectral will prompt for it on first analysis.
See the documentation for setup guides, capture instructions, and CLI reference.
How it works
- Capture — Chrome extension (web) or MITM proxy records traffic while you use the app
- Analyze — An LLM correlates your actions with API calls, infers endpoint patterns, and business meaning
- Authenticate — The CLI detects the auth flow and generates a login script. Run it once; the MCP server refreshes automatically
- Use — Start the MCP server. AI agents call the API directly
License
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 spectral_mcp-0.3.1.tar.gz.
File metadata
- Download URL: spectral_mcp-0.3.1.tar.gz
- Upload date:
- Size: 98.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a13095d12acbd9caa8578f5effee1355eb0001617384ed8057421c9887ef6d74
|
|
| MD5 |
3608eefae49eaac67e03045cb2b584c8
|
|
| BLAKE2b-256 |
95dca1b5d1b3e3ab91891ac7221cc165b84c2987c915a059a166e5e091bc33f1
|
Provenance
The following attestation bundles were made for spectral_mcp-0.3.1.tar.gz:
Publisher:
release.yml on romain-gilliotte/spectral
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spectral_mcp-0.3.1.tar.gz -
Subject digest:
a13095d12acbd9caa8578f5effee1355eb0001617384ed8057421c9887ef6d74 - Sigstore transparency entry: 1092853817
- Sigstore integration time:
-
Permalink:
romain-gilliotte/spectral@0098a783a79e0e57eb619bf18b3cb5e33c29c177 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/romain-gilliotte
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0098a783a79e0e57eb619bf18b3cb5e33c29c177 -
Trigger Event:
push
-
Statement type:
File details
Details for the file spectral_mcp-0.3.1-py3-none-any.whl.
File metadata
- Download URL: spectral_mcp-0.3.1-py3-none-any.whl
- Upload date:
- Size: 139.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54a95850818e0ed0bd2f11930e38fa7e048bd4b49c437589138c07fac9e13730
|
|
| MD5 |
9aca64452dd60ac086c5d486fa0a659a
|
|
| BLAKE2b-256 |
697895a29628aa23de4edd4fca481ace8c3ae87a470c214d838539a43c2f5801
|
Provenance
The following attestation bundles were made for spectral_mcp-0.3.1-py3-none-any.whl:
Publisher:
release.yml on romain-gilliotte/spectral
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spectral_mcp-0.3.1-py3-none-any.whl -
Subject digest:
54a95850818e0ed0bd2f11930e38fa7e048bd4b49c437589138c07fac9e13730 - Sigstore transparency entry: 1092853821
- Sigstore integration time:
-
Permalink:
romain-gilliotte/spectral@0098a783a79e0e57eb619bf18b3cb5e33c29c177 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/romain-gilliotte
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0098a783a79e0e57eb619bf18b3cb5e33c29c177 -
Trigger Event:
push
-
Statement type: