Skip to main content

Documentation Index

Fetch the complete documentation index at: https://trunk-4cab4936-sam-gutentag-changelog-mcp-api-token-auth.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The Trunk MCP server now accepts API token authentication as an alternative to OAuth, so you can use Trunk’s MCP tools from CI jobs, scripts, and any client that doesn’t support an OAuth flow. OAuth stays the default for interactive clients. For headless and CI use, pass a Trunk organization API token via the standard Authorization: Bearer <token> header. The server first tries the OAuth (JWT) path; if the token isn’t a valid JWT, it looks the token up as an org API token and authenticates the request at the org level. Authorization checks still apply.
{
  "mcpServers": {
    "trunk": {
      "url": "https://mcp.trunk.io/mcp",
      "headers": { "Authorization": "Bearer <your-trunk-api-token>" }
    }
  }
}
Read the docs to learn more.