https://github.com/romain-gilliotte/spectral
Capture web traffic while browsing, then let an LLM analyze it into OpenAPI specs, GraphQL schemas, and ready-to-use CLI configs with auth
https://github.com/romain-gilliotte/spectral
api api-discovery chrome-extension cli graphql llm mitmproxy openapi restish reverse-engineering
Last synced: 13 days ago
JSON representation
Capture web traffic while browsing, then let an LLM analyze it into OpenAPI specs, GraphQL schemas, and ready-to-use CLI configs with auth
- Host: GitHub
- URL: https://github.com/romain-gilliotte/spectral
- Owner: romain-gilliotte
- License: mit
- Created: 2026-02-12T23:27:08.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-03-05T17:16:43.000Z (20 days ago)
- Last Synced: 2026-03-05T20:07:25.030Z (20 days ago)
- Topics: api, api-discovery, chrome-extension, cli, graphql, llm, mitmproxy, openapi, restish, reverse-engineering
- Language: Python
- Size: 2.86 MB
- Stars: 6
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Install ·
Why Spectral ·
How it works ·
Documentation
Browse any website or mobile app normally. Spectral observes what you do, figures out the meaning behind each API call, and builds MCP tools that let AI agents use the same app.
## 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:
```bash
curl -LsSf https://raw.githubusercontent.com/romain-gilliotte/spectral/main/install.sh | bash
```
If you prefer managing packages yourself, you can install directly with pip or [uv](https://docs.astral.sh/uv/) — but you will need to set up shell completions manually:
```bash
pip install spectral-mcp
# or
uv tool install spectral-mcp
```
You also need an [Anthropic API key](https://console.anthropic.com/) — Spectral will prompt for it on first analysis.
See the [documentation](https://romain-gilliotte.github.io/spectral/) for setup guides, capture instructions, and CLI reference.
## How it works
1. **Capture** — Chrome extension (web) or MITM proxy records traffic while you use the app
2. **Analyze** — An LLM correlates your actions with API calls, infers endpoint patterns, and business meaning
3. **Authenticate** — The CLI detects the auth flow and generates a login script. Run it once; the MCP server refreshes automatically
4. **Use** — Start the MCP server. AI agents call the API directly
## License
[MIT](LICENSE)