# Use Webcite from a coding agent

Connect a coding agent to the hosted Webcite MCP server, run the npm server for local files, and point the agent at llms.txt, Markdown pages and OpenAPI.

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

## Connect the hosted MCP server

Add this URL as an MCP server in your agent's client:

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

In a client with OAuth, choose OAuth or Sign in, sign in to Webcite and select Allow. In a client without OAuth, create a key on the [API Keys page](/api-keys) and send it as an `Authorization: Bearer YOUR_API_KEY` (or `x-api-key`) header. Both bill the same account credits. [Hosted MCP](/api-docs/mcp#hosted) has the client steps.

## Run the npm server for local files

The hosted `upload_file` tool takes a filename and base64 content, up to 20 MB, and cannot read a path on your computer. File paths are supported only by a local MCP server with access to that file. The npm package is `webcite-mcp-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
```

[Local MCP](/api-docs/mcp#local) links the package documentation, and [Upload through MCP](/api-docs/mcp#files) covers files at a public HTTPS URL.

## Make the first tool call

Have the agent call `webcite_guide` first to select a workflow. `verify_claim` checks one claim against web sources. The [tool catalog](/api-docs/mcp#profiles) lists the public tools by workflow.

## Give the agent the reference

An agent that writes HTTP code can read these without a JavaScript browser:

- [llms.txt](https://webcite.co/llms.txt): the documentation index, with a Markdown link for each page.
- [llms-full.txt](https://webcite.co/llms-full.txt): the guides and reference in one file.
- Every documentation page has a `.md` copy, such as [the quickstart](https://webcite.co/api-docs/quickstart.md).
- [OpenAPI](https://webcite.co/api-docs/openapi.json): operation names, parameters and schemas.
- [mcp.json](https://webcite.co/.well-known/mcp.json): the MCP server URL, the npm package and the tool names.

HTTP requests go to `https://api.webcite.co` with the key in the `x-api-key` header. The [quickstart](/api-docs/quickstart) shows one request with its recorded output.
