Skip to main content

Automatically discover and document web application APIs

Project description

Spectral

PyPI Python CI License

Install · Why Spectral · How it works · Documentation · Website

AI agents shouldn't need browser automation. Mobile and web apps talk to private APIs all day — Spectral gives that same access to your AI agents.

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.

Spectral supports multiple LLM providers — Anthropic, OpenRouter, OpenAI, Ollama, and any OpenAI-compatible endpoint. Run spectral config to pick your provider and model. Spectral will prompt for it on first analysis.

  • 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

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.10.1.tar.gz (109.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.10.1-py3-none-any.whl (153.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spectral_mcp-0.10.1.tar.gz
  • Upload date:
  • Size: 109.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.10.1.tar.gz
Algorithm Hash digest
SHA256 824e76d3827db9335d2db1c7630609f929a6346982432e59dcea8fc6490cd21b
MD5 c5acaf383c9c225a5e70466cd7db6bb4
BLAKE2b-256 01fb0ab59be48c93032e402c6178fed07049d4b9e01098ec0246037a841d2dee

See more details on using hashes here.

Provenance

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

Publisher: release.yml on spectral-mcp/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.10.1-py3-none-any.whl.

File metadata

  • Download URL: spectral_mcp-0.10.1-py3-none-any.whl
  • Upload date:
  • Size: 153.1 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.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b61166c423f446cc3558ffdd868fe34c117674348331127ed8fa8e8bcd6625d4
MD5 fe96a137ab89d57d8ca3da793226546a
BLAKE2b-256 fdde19362cd2e7ae2d07221865f196d74672a60069ff1e6ed34b36bf9340bd42

See more details on using hashes here.

Provenance

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

Publisher: release.yml on spectral-mcp/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