Metadata-Version: 2.4
Name: analog-mcp
Version: 0.5.1
Summary: Model Context Protocol server for Analog — let AI agents understand any website in a format built for AIs.
Project-URL: Homepage, https://getanalog.io
Author-email: Marcus Campbell <marcus@getanalog.io>
License: MIT
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: analog-sdk<0.11.0,>=0.10.0
Requires-Dist: mcp>=1.0
Description-Content-Type: text/markdown

# analog-mcp

A Model Context Protocol server that exposes [Analog](https://getanalog.io)'s
webpage-extraction engine to MCP-compatible AI agents — Claude Desktop,
Cursor, and anything else that speaks MCP.

The headline tool is `analog(url)`. Point it at a webpage; get back
structured records (articles, pricing tables, product listings, etc.)
already parsed into JSON. Same one-call shape as the Python SDK.

## Tools

- **`analog(url)`** — extract a page; returns the structured JSON plus a `handle`.
- **`assess(url)`** — check whether a page is worth extracting or is better read
  as markdown — a recommendation plus token economics, so you route a page
  without spending an extraction. No sign-in required.
- **`analog_open(handle)`** — re-open a previous result by handle, no re-fetch.
- **`analog_export(handle, fmt)`** — re-emit it as `json` / `csv` / `yaml` / `md`.
- **`analog_section(handle, index)`** — pull one section's records.
- **`analog_find(handle, pattern)`** — search a result's records across sections.

Every `analog` result is saved locally, so the `analog_*` tools re-slice it
without re-fetching or re-rendering the page.

## Install

```bash
pip install analog-mcp
```

Or via [uv](https://docs.astral.sh/uv/):

```bash
uvx analog-mcp     # one-off
uv tool install analog-mcp
```

## Sign in

`analog-mcp` installs the `analog` CLI alongside it. Sign in once:

```bash
analog login
```

This opens your browser, signs you in, and stores the key in your OS
keyring — `analog-mcp` reads it from there, so no key ever lands in a
config file.

Analog renders pages with a built-in headless browser that downloads on
first use (~150 MB, one-time). To fetch it ahead of time so the first
`analog` tool call doesn't pause, run `analog browser install`.

## Configure your MCP client

### Claude Desktop

Edit `~/Library/Application Support/Claude/claude_desktop_config.json`
(macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):

```json
{
  "mcpServers": {
    "analog": {
      "command": "analog-mcp"
    }
  }
}
```

Restart Claude Desktop. The `analog` tool will appear in the tool list.
No `env` block is needed — `analog-mcp` reads the credential you stored
with `analog login`.

### Cursor / other MCP clients

Same idea — the server command is `analog-mcp` and it speaks stdio.
Refer to your client's MCP configuration docs for the exact file
location.

## Usage

Once configured, just ask the agent things like:

> Extract the speakers from <https://example-conference.com/2026>

The agent calls `analog(url=…)` under the hood. The tool returns
self-contained JSON with the parsed records plus a markdown rendering
of the page, which the agent can then reason over directly.

## What this version ships

`analog-mcp` exposes the extraction tool `analog(url)`, a local routing
check `assess(url)`, and the `analog_*` re-slice tools, over the stdio
transport.

## License

MIT — see [LICENSE](./LICENSE).

## Links

- Homepage: <https://getanalog.io>
- Python SDK: [`analog-sdk` on PyPI](https://pypi.org/project/analog-sdk/)
