API and MCP

MCP for AI agents

Connect an AI agent to Veresk over the Model Context Protocol.

Veresk includes an MCP server (Streamable HTTP, stateless) so an AI agent can do the same work as the REST API: read and edit files, manage versions and tags, compare and publish. Both use the same logic and the same permissions.

Endpoint: https://<your-veresk-host>/api/mcp. Authenticate with an API token.

Claude Code

claude mcp add --transport http veresk https://<your-veresk-host>/api/mcp \
  --header "Authorization: Bearer <YOUR_API_TOKEN>"

Codex

Codex reads the token from an environment variable, so the token never goes into the config file.

  1. Set the variable in the shell where you start Codex:
    export VERESK_API_TOKEN="<YOUR_API_TOKEN>"
    
  2. Add the server to ~/.codex/config.toml:
    [mcp_servers.veresk]
    url = "https://<your-veresk-host>/api/mcp"
    bearer_token_env_var = "VERESK_API_TOKEN"
    

bearer_token_env_var takes the name of the variable, not the token itself. If the variable is not set when Codex starts, Codex sends no token and Veresk answers 401 Unauthorized. Run codex mcp list to check that the server is configured.

Cursor, VS Code, Claude Desktop and others

Add the server to the client's MCP configuration (this form sends the token in a header):

{
  "mcpServers": {
    "veresk": {
      "url": "https://<your-veresk-host>/api/mcp",
      "headers": { "Authorization": "Bearer <YOUR_API_TOKEN>" }
    }
  }
}

The Account & API page shows these snippets with your host filled in, and with your token right after you create it.

Limits

  • Authentication is by header token. OAuth is not supported, so web-only connectors that require OAuth (for example claude.ai or ChatGPT connectors) cannot connect.
  • Agents have the same restrictions as the REST API: they cannot create or delete projects, change roles, or touch encryption and Git settings.
  • Files changed by an agent get the tags api-created and api-edited.

This documentation for agents

These docs are published as plain HTML and also at /llms.txt and /llms-full.txt, so an agent can read them without a browser.