docs / agent-bridge

Agent Bridge (MCP)

Connect Cursor, Claude Code, or Codex to your Xtractly library over MCP.

All docs

The Agent Bridge is an MCP server that gives your coding agent direct access to your Xtractly account. It can read what your extension captured and the components you've built, and write new components back — running on your agent subscription instead of Xtractly credits.

Connect

1

In the app, open Settings → Agent Bridge and generate an access token. Copy it — it starts with xtr_ and is only shown once.

2

Add the server to your agent. In Claude Code:

$claude mcp add xtractly --transport http https://xtractly.com/api/mcp --scope user

For Cursor, Codex, or another client, add an HTTP MCP server pointing at https://xtractly.com/api/mcp.

3

Authenticate with the token as a Bearer header:

json
{
  "mcpServers": {
    "xtractly": {
      "type": "http",
      "url": "https://xtractly.com/api/mcp",
      "headers": { "Authorization": "Bearer xtr_your_token" }
    }
  }
}
4

Verify: run /mcp in Claude Code (or check your client's tool list) and ask the agent to "list my Xtractly projects".

Heads up

Each token has full read/write access to your projects. Treat it like a password, use a separate token per machine, and revoke unused ones from Settings → Agent Bridge.

Tools

ToolWhat it does
list_projectsYour projects, most recently updated first.
get_projectA project's details plus its full message / component history.
get_extractionThe raw content captured for a project (by the extension or the first prompt) — use as context before generating.
list_componentsEvery saved component across all projects — the /components library. Supports a title filter.
get_fragmentOne component's full file set by id.
create_fragmentSave a new component to a project — appears in history and the preview just like an in‑app generation.
update_fragmentPatch files on an existing component (merges with the current set — the same write path as the Playground).
get_guideA step‑by‑step workflow for a task: extension-sync, fragment-authoring, or library-export.

Typical workflows

Pull a component into your repo

Ask the agent to list_components (optionally with a search), then get_fragment for the one you want, and write the files under src/components/xtractly/<name>/, adjusting import aliases to match your project. get_guide with library-export spells this out.

Rebuild an extension capture as code

Capture a page section with the extension so it lands in a project, then from your editor: get_extraction for that project → generate a clean component → create_fragment to save it back so it's in your library too.

Iterate from your editor

get_fragment to read the current files, make changes locally, update_fragment to push them back. Your Playground history records the change like any other edit.

Notes

  • The server is stateless — a fresh connection per request. If tools stop responding, restart your agent session first.
  • Everything is scoped to the account that owns the token; the agent only ever sees your own projects and components.

Still stuck? We're happy to help.

support@xtractly.com