# Build with AI

Give your AI assistant or coding agent Weav's docs, so it writes your integration from the real API, not from guesses.

## Connect the MCP server

The docs have a public MCP server at `https://docs.weavpayments.com/mcp`. MCP (Model Context Protocol) is how AI tools reach outside help. With it, your assistant can search these docs and read any page or endpoint while it works. It reads the docs only: it never sees your API keys, and it can't call Weav's API.

```shell title="Claude Code"
claude mcp add --transport http weav-docs https://docs.weavpayments.com/mcp
```

```json title="Cursor (.cursor/mcp.json)"
{
    "mcpServers": {
        "weav-docs": {
            "url": "https://docs.weavpayments.com/mcp"
        }
    }
}
```

```json title="VS Code (.vscode/mcp.json)"
{
    "servers": {
        "weav-docs": {
            "type": "http",
            "url": "https://docs.weavpayments.com/mcp"
        }
    }
}
```

In apps that take a custom MCP connector, such as Claude, use the same URL.

What it can do:

| Tool | What it does |
| --- | --- |
| `search_docs` | Finds the pages and sections about a question, such as "verify a webhook signature". |
| `get_page` | Reads one page as Markdown, by its path, such as `/webhooks/verifying-signatures`. |
| `list_endpoints` | Lists every endpoint, grouped by resource. |
| `get_endpoint` | Reads one endpoint: its fields, responses, errors and code samples. |
| `get_openapi` | Returns the OpenAPI file, for generating a client. |

## Every page as Markdown

Every page has a Markdown copy: add `.md` to its address, such as [/authentication.md](https://docs.weavpayments.com/authentication.md). Under each page's title: **Copy for LLM**, **View as Markdown**, and **More actions**, which opens the page in ChatGPT, Claude or Grok, or connects Cursor, VS Code or Claude Code to the MCP server in one click.

For the whole site at once:

- [llms.txt](https://docs.weavpayments.com/llms.txt): what Weav is, and a link to every page's Markdown ([llmstxt.org](https://llmstxt.org)).
- [llms-full.txt](https://docs.weavpayments.com/llms-full.txt): every page, guides and reference, in one file.
- [openapi.yaml](https://docs.weavpayments.com/openapi.yaml): the API as OpenAPI 3.1.

## Keep your keys out of chats

> **Warning:** Never paste an API key or signing key into an AI chat, a prompt or code it writes. Keep keys in your server's environment (for example `WEAV_API_KEY`), and build and test with a test key (`wv_test_`) only.

A good start for your assistant:

```text title="Prompt"
Use the weav-docs MCP server (or https://docs.weavpayments.com/llms.txt).
Integrate Weav checkouts into this app: create a checkout on the server,
send the customer to checkout_url, and fulfill the order on the
CHECKOUT_COMPLETED webhook after verifying X-Signature. Read the API key
from the WEAV_API_KEY environment variable. Use a test key while building.
```
