Before integrating the MCP Server with Claude Desktop, review the Security considerations and Privacy and regulatory sections. The MCP allows external AI systems to access analytics data from your Matomo instance. You must ensure that appropriate authentication, data access controls, and privacy safeguards are in place before allowing an AI tool to query your analytics data.

Before you start

  1. The MCP Server is included with Matomo Cloud. For Matomo On-Premise, you will need to first install and activate the MCP Server plugin.
  2. In both Matomo environments, the MCP will need to be manually enabled in Matomo before use.
  3. Copy the MCP Server URL found in Administration admin gear icon > Export > MCP Server. When the MCP is enabled, the endpoint for MCP is displayed. This is required when creating the connector in Claude Desktop.
  4. OAuth 2.0 is the primary authentication method for connecting Claude to the Matomo MCP server. Token-based authentication using a Matomo token_auth is not supported by Claude for this connection. (updated August 2026)

Configure an OAuth 2.0 client in Matomo

  1. In Administration settings, go to Export > OAuth 2.0 to create the OAuth 2.0 client in Matomo.
  2. Configure the allowed grants and scopes required for the connection.
  3. Add the following Claude callback URL to the allowed Redirect URIs:
    https://claude.ai/api/mcp/auth_callback
  4. The callback URI must match exactly.
    add uri to oauth client
  5. If you add multiple URIs, enter each one on a separate line.
  6. Copy the Client ID and Client secret, as you will need to provide it for the custom connector in Claude.

Add the Matomo MCP custom connector in Claude Desktop

  1. In Claude Desktop, go to Chat > Customize > Connectors.
  2. Click the + plus icon and select Add custom connector.
  3. Expand the Context menu and select Connectors.
  4. Click Add Connector.
    add custom connector in claude
  5. Enter a unique name for the connector.
  6. Paste the MCP Server URL in the HTTPS address field.
  7. Enter the OAuth 2.0 client ID and secret (found in the client settings in Matomo).
  8. Click Add and then Connect, if prompted.
  9. Confirm the requested scopes by clicking Allow.
  10. When the connection is verified, set the Tool permissions to control access to Matomo tools.
    allowed tools in claude

Use the Matomo MCP connector in Claude chat

When the Matomo MCP connector is successfully setup, it will appear under Connectors in Claude Desktop. You can now query your Matomo data using Claude’s chat feature as long as the Matomo MCP connector remains connected.

mcp claude desktop

Get started with example prompts that help you analyse data through the Matomo MCP.

Troubleshooting MCP Connections

If you get the error, Couldn’t connect to the server. Check the URL points to a valid MCP server, check the following:

  • The MCP Server is enabled in System > General settings > MCP Server.
  • The MCP Server URL is copied exactly as shown in the Matomo settings.
  • The OAuth 2.0 client settings and callback URI are correct.
  • The user should not exceed any configured Maximum allowed MCP privilege level restrictions.
  • Delete and recreate the connector after verifying the authentication details and user permissions.

Explore more Matomo MCP Server integration guides.

Previous FAQ: Integrate the Matomo MCP Server with Claude Code