# Build with AI (/docs/getting-started/build-with-ai)

Your AI coding assistant can read these docs while it writes your integration. Connect it to the docs MCP server, and it can search the guides, read any page, and look up the exact fields of every endpoint.

The server only reads the docs. It never calls the Comecero API and needs no token.

## Connect the MCP server [#connect-the-mcp-server]

The server address is `https://docs.comecero.com/mcp` (streamable HTTP, no sign-in).

<Tabs items={['Claude Code', 'Cursor', 'VS Code', 'Other apps']}>
<Tab value="Claude Code">

```bash
claude mcp add --transport http comecero-docs https://docs.comecero.com/mcp
```

</Tab>
<Tab value="Cursor">

Add this to `.cursor/mcp.json` in your project, or to `~/.cursor/mcp.json` for every project:

```json
{
  "mcpServers": {
    "comecero-docs": { "url": "https://docs.comecero.com/mcp" }
  }
}
```

</Tab>
<Tab value="VS Code">

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

```json
{
  "servers": {
    "comecero-docs": { "type": "http", "url": "https://docs.comecero.com/mcp" }
  }
}
```

</Tab>
<Tab value="Other apps">

In Claude, ChatGPT or any app that takes a remote MCP server, add a custom connector with the URL `https://docs.comecero.com/mcp`.

</Tab>
</Tabs>

Then ask, for example: "Using the Comecero docs, create a cart and pay for it with a test card in Node.js."

### Tools [#tools]

| Tool | What it does |
|------|--------------|
| `search_docs` | Searches the guides and the API reference. |
| `list_pages` | Lists every page with its URL and a one-line summary. |
| `get_page` | Returns a page as Markdown, by its URL. |
| `list_endpoints` | Lists every endpoint as `METHOD /path`, optionally for one resource such as `carts`. |
| `get_endpoint` | Returns one endpoint in full: a ready test-mode curl call, an example response, and the request and response schemas. Look it up by operation id (`create_cart`) or `POST /carts`. |

## Markdown [#markdown]

Every page is also plain Markdown, which uses fewer tokens than HTML:

- Add `.md` to the URL: [/docs/guides/webhooks.md](/docs/guides/webhooks.md).
- Or send `Accept: text/markdown` to the normal URL.
- Or use **Copy page** at the top of any page, and paste it into a chat. The **Open** menu next to it sends the page to ChatGPT, Claude or Cursor.

```bash title="Request"
curl https://docs.comecero.com/docs/guides/webhooks -H "Accept: text/markdown"
```

## llms.txt and OpenAPI [#llmstxt-and-openapi]

- [/llms.txt](/llms.txt): a map of every page, following [llmstxt.org](https://llmstxt.org).
- [/llms-full.txt](/llms-full.txt): every page in one file.
- [/openapi.json](/openapi.json): the whole API as OpenAPI 3.1, for code generators, Postman, Insomnia and agents that call APIs.

## Tips for good results [#tips-for-good-results]

- Tell the assistant to use **test mode**: a test token (`secret.test.…`), product ids that end in `.test`, and the test card `4444555566661111`.
- Ask it to check each call against `get_endpoint` before it writes code. Updates use `POST`, not `PATCH`, and there is no `POST /orders`.
- Keep your secret token out of the chat. Put it in an environment variable such as `COMECERO_TEST_TOKEN`.
