# Build with AI

These docs are built to be read by AI assistants and coding agents. Connect your tool to the MCP server below and it reads the current docs directly — no copying and pasting.

## Connect the MCP server

MCP server URL: `https://docs-staging.payme.io/mcp`

It uses Streamable HTTP and is read-only. Public docs need no key or sign-in.

### Claude Code

```bash
claude mcp add --transport http payme-docs https://docs-staging.payme.io/mcp
```

### Cursor

Add to `.cursor/mcp.json` in your project:

```json
{
  "mcpServers": {
    "payme-docs": {
      "url": "https://docs-staging.payme.io/mcp"
    }
  }
}
```

### VS Code

Add to `.vscode/mcp.json` in your project:

```json
{
  "servers": {
    "payme-docs": {
      "type": "http",
      "url": "https://docs-staging.payme.io/mcp"
    }
  }
}
```

### Claude (desktop app and claude.ai)

Open **Settings → Connectors → Add custom connector** and paste the MCP server URL. On Team and Enterprise plans, an owner adds it under **Admin settings → Connectors**.

### ChatGPT

Turn on **developer mode** in ChatGPT's settings, create a connector with the MCP server URL and choose **No authentication**. Developer mode depends on your plan.

## What the MCP server can do

| Tool | What it does |
|---|---|
| `search_docs` | Full-text search across the guide and API endpoint pages you can read. |
| `get_page` | Returns one documentation page — guide or API endpoint — as Markdown. |
| `list_products` | Lists every documented product: its id (the "product" argument of the other tools), title, type ("api-reference" products have endpoints and an OpenAPI spec; "guide" products are prose), description and URLs. |
| `list_endpoints` | Lists the API endpoints of one product, by category: method + path, title, and the category/slug to pass to get_endpoint. |
| `get_endpoint` | Returns one API endpoint: its full Markdown reference (method and URL per environment, the credentials it documents, parameters, request fields and example, code samples, every response) followed by its OpenAPI operation as JSON. |
| `get_openapi` | Returns the OpenAPI 3.1 spec of one api-reference product as compact JSON: its info, servers, security and operations (parameters, request body, responses). |

## Machine-readable files

- [llms.txt](https://docs-staging.payme.io/llms.txt): an index of every page, written for AI tools
- [Sitemap](https://docs-staging.payme.io/sitemap.xml): every page address
- [Marketplaces & Platforms full text](https://docs-staging.payme.io/marketplaces-and-platforms/llms-full.txt): every Marketplaces & Platforms page in one file
- [Payments OpenAPI spec](https://docs-staging.payme.io/payments/openapi.json): the OpenAPI document (also as [YAML](https://docs-staging.payme.io/payments/openapi.yaml))
- [Payments tool definitions](https://docs-staging.payme.io/api/v1/projects/payments/api/tools.json): one function-calling tool per endpoint
- [Payments full text](https://docs-staging.payme.io/payments/llms-full.txt): every Payments page in one file
- [B2B Payments OpenAPI spec](https://docs-staging.payme.io/b2b-payments/openapi.json): the OpenAPI document (also as [YAML](https://docs-staging.payme.io/b2b-payments/openapi.yaml))
- [B2B Payments tool definitions](https://docs-staging.payme.io/api/v1/projects/b2b-payments/api/tools.json): one function-calling tool per endpoint
- [B2B Payments full text](https://docs-staging.payme.io/b2b-payments/llms-full.txt): every B2B Payments page in one file
- [Keep OpenAPI spec](https://docs-staging.payme.io/keep/openapi.json): the OpenAPI document (also as [YAML](https://docs-staging.payme.io/keep/openapi.yaml))
- [Keep tool definitions](https://docs-staging.payme.io/api/v1/projects/keep/api/tools.json): one function-calling tool per endpoint
- [Keep full text](https://docs-staging.payme.io/keep/llms-full.txt): every Keep page in one file
- [Products and Customers OpenAPI spec](https://docs-staging.payme.io/products-and-customers/openapi.json): the OpenAPI document (also as [YAML](https://docs-staging.payme.io/products-and-customers/openapi.yaml))
- [Products and Customers tool definitions](https://docs-staging.payme.io/api/v1/projects/products-and-customers/api/tools.json): one function-calling tool per endpoint
- [Products and Customers full text](https://docs-staging.payme.io/products-and-customers/llms-full.txt): every Products and Customers page in one file
- [eCommerce full text](https://docs-staging.payme.io/ecommerce/llms-full.txt): every eCommerce page in one file
- [All documentation, full text](https://docs-staging.payme.io/llms-full.txt): every page in one file
- [MCP server](https://docs-staging.payme.io/mcp): Model Context Protocol over Streamable HTTP — search the docs, read pages, endpoints and OpenAPI specs
- [Search API](https://docs-staging.payme.io/api/v1/search?q=): GET with `q=<query>`; returns matching pages as JSON
- CLI: `npx -p @payme-io/docs-cli payme-docs` — manage these docs from a terminal or CI with an API key (package `@payme-io/docs-cli`); to read them, use the Markdown URLs, MCP or the search API
- Markdown: append `.md` to any page URL for that page as Markdown, or request the page URL with `Accept: text/markdown`
- Source: append `.yaml` to an endpoint page URL (a line that reads `METHOD path — summary`) for its source YAML; guide pages have no YAML

## Example prompts

- Using the payme-docs MCP server, list the Payments endpoints and tell me which ones my integration needs.
- Using the payme-docs MCP server, read the "Generate Payment" endpoint and write a TypeScript function that calls it in the sandbox, with error handling.
- Using the payme-docs MCP server, read "Merchant Default URLs" and turn it into a step-by-step checklist for my project.

## Tips

- Try every call in the sandbox before you go live.
- Keep API keys and secrets on your server — never in browser or mobile code, and never in a prompt. See [Authentication](https://docs-staging.payme.io/payments/getting-started/authentication).
- Prefer the MCP server or the `.md` version of a page over scraping its HTML: you get the full reference without the page layout.
