Skip to main content

Automatically discover and document web application APIs

Project description

Spectral

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.

Spectral demo — analyze traffic, then Claude uses the API

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

pip install spectral-mcp

or with uv:

uv tool install spectral-mcp

Alternatively, install from source with the one-liner:

curl -LsSf https://raw.githubusercontent.com/romain-gilliotte/spectral/main/install.sh | bash

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

  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

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

spectral_mcp-0.1.0.tar.gz (98.1 kB view details)

Uploaded Source

Built Distribution

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

spectral_mcp-0.1.0-py3-none-any.whl (139.3 kB view details)

Uploaded Python 3

File details

Details for the file spectral_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: spectral_mcp-0.1.0.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

Hashes for spectral_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6ce6f53cbaff727531b662d3103636d8397ee1d2ef4502aaf7a4301fc4d07d59
MD5 f66d4736c82839ef5876ece8580b955e
BLAKE2b-256 2eef5969f4d9cee9030f112a25fcf6241f90ef873519a0c98e145ab5633de081

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectral_mcp-0.1.0.tar.gz:

Publisher: release.yml on romain-gilliotte/spectral

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

File details

Details for the file spectral_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: spectral_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 139.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for spectral_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b591fd0ae21ba8f83fe5a98629686102d308334b8a24a0ee1182f3fc35fe8139
MD5 ce78374c8824b3999ac9df98d91d827a
BLAKE2b-256 05053030e1b5b209b18e704adb5817c2a0f3a5ccf89e3ef6459ac990c2430d0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectral_mcp-0.1.0-py3-none-any.whl:

Publisher: release.yml on romain-gilliotte/spectral

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