# Connect an AI agent

Use Webcite through MCP or give an agent the HTTP reference.

Documentation index: https://webcite.co/llms.txt
Canonical page: https://webcite.co/api-docs/mcp
API origin: https://api.webcite.co
Authentication: x-api-key header. Keep keys on your server.

## Hosted MCP

Follow [Connect to Claude](/connect) to configure a custom connector. The hosted endpoint is:

```text
https://api.webcite.co/mcp
```

Use an `Authorization: Bearer YOUR_API_KEY` header as described on the connect page. The public profile exposes 21 API workflows plus `webcite_guide`. Call the guide first to select a workflow. Tool availability does not override backend feature gates.

## Local MCP

Set the environment variable before starting the server:

```bash
export WEBCITE_API_KEY="YOUR_API_KEY"
npx -y webcite-mcp-server
```

For Claude Code, with the key available in its environment:

```bash
claude mcp add webcite -- npx -y webcite-mcp-server
```

See the [package documentation](https://www.npmjs.com/package/webcite-mcp-server) for profiles and configuration. Context and evaluation tools are opt-in and have separate backend requirements.

## Upload through MCP

Hosted `upload_file` takes a filename and base64 content, up to 20 MB. It cannot read a path on your computer. File paths are supported only by a local MCP server with access to that file.

## HTTP tools and automation

An agent or workflow builder can use [OpenAPI](/api-docs/openapi.json) to inspect operation names, parameters, and schemas. Configure API-key authentication with header name `x-api-key`. Handle non-success status codes and preserve source IDs in later steps.

For documentation context, start with [llms.txt](/llms.txt). Every page has a `.md` equivalent; [llms-full.txt](/llms-full.txt) combines the guides and reference. These formats provide direct access to the text, without requiring a JavaScript browser.

## MCP 1.9.0: evidence and saved results

Production rollout verified on 24 September 2026: the hosted API includes evidence policy 13 and the hosted MCP connector runs 1.9.0. This does not publish or upgrade the npm package installed by local clients. Inspect response metadata and the installed client version; saved responses retain their original policy and evidence time.

- `verify_claim` and `verify_claim_stream` return readable text plus `structuredContent` containing the complete backend response, including optional evidence and real IDs.
- `verify_batch` returns `{ results: [...] }`, preserving item records, binding details and feedback tokens.
- `get_citation` preserves the API `{ data: ... }` envelope and adds normalized `citations` and optional `final_response` from stored metadata (or a verdict-bearing legacy object). The snapshot preserves final evidence before credit settlement, so usage fields can differ from the final response. It does not generate a replacement verdict.
- Text labels unknown and heuristic scores; `0` is displayed as zero. Generated snippets are not presented as publisher quotations.
- Streaming requires a full result followed by `done`. Partial groups, missing completion, backend errors and accounting errors return `partial_result`, not raw events presented as a finished verification. Successful stream usage is preserved as `stream_usage`.

Malformed stored JSON or response shapes return `invalid_api_output`. Check `isError` before consuming structured evidence. The package changes do not alter backend feature gates or prove that historical sources were read.
