Before integrating the MCP Server with ChatGPT, 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

Ensure the Matomo MCP server is enabled. For Matomo On-Premise, install and activate the MCP plugin before use.
To connect Matomo to ChatGPT, you will need to create a custom app (connector) in ChatGPT, provide your Matomo MCP server details, and create an OAuth 2.0 client during setup.

Note: Some limitations apply to how tool updates are handled in ChatGPT. This is covered in the Important limitations and maintenance notes section below.

Ensure you have the following to configure the integration:

  1. Access to a ChatGPT account with developer mode enabled to create apps (connectors).
  2. Copy your Matomo MCP endpoint URL found in Matomo Administration matomo admin gear icon (On-Premise) Platform > MCP Server.

Create a ChatGPT app (connector)

A custom app allows ChatGPT to securely access your Matomo data via MCP. Your MCP server must be accessible over HTTPS.

  1. Open ChatGPT > Settings > Apps (or open Apps from the ChatGPT workspace menu)
    chatgpt app settings
  2. Click Create app.
  3. The New App modal will appear where you can enter the connection details for the MCP.
  4. Provide an easily identifiable name, for example, we recommended using Matomo Analytics.
  5. Enter a description for additional context on its usage, for example:
    Provides access to Matomo Analytics data for websites, including traffic, visitor behaviour, acquisition channels, campaigns, conversions, and performance metrics. Use this when the user asks about website analytics, traffic trends, campaign performance, or wants data about visits, users, or goals.

  6. Enter the MCP Endpoint URL found in the MCP Server settings in Matomo, for example:
    https://mysite/index.php?module=API&method=McpServer.mcp&format=mcp
    add mcp settings in chatgpt

  7. Click on Advanced settings to provide the OAuth 2.0 details
  8. Copy the Callback URL provided by ChatGPT.
  9. Open a new browser tab and go to your Matomo instance to setup the OAuth 2.0 client. See the guide on setting up OAuth 2.0.
    oauth advanced settings in chatgpt
  10. Paste the Callback URL (copied from ChatGPT) into the OAuth client settings in the Redirect URIs field.
  11. Save the OAuth client and copy the Client ID and Client secret as you will need to provide those credentials in ChatGPT.
  12. Return to the browser window with the ChatGPT App.
  13. In the OAuth advanced settings, paste the Client ID and Client secret copied from the OAuth client settings in Matomo.
    enter client id and client secret
  14. The Token endpoint auth method will automatically update to client_secret_post once the credentials are entered.
  15. Scroll down to Default scopes and define the scope as configured in the OAuth client settings in Matomo. For example, if you only want to allow read access, set the scope as matomo:read.
  16. For the OAuth endpoints, provide the Auth URL for your Matomo OAuth 2.0 server, for example:
    https://$MATOMO_DOMAIN/index.php?module=OAuth2&action=authorize
  17. Provide the Token URL for your Matomo OAuth 2.0 server, for example:
    https://$MATOMO_DOMAIN/index.php?module=OAuth2&action=token
    chatgpt oauth endpoints
  18. Once all the fields are correctly configured and you have read the ChatGPT and Matomo MCP security considerations, you can choose to proceed with creating the app.
  19. If applicable, click on the checkbox to confirm that you understand the ChatGPT security notice and want to continue.
  20. Click Create.
  21. You will be prompted to give access to the MCP based on the defined scope, such as read level access.

The newly created app will now be visible in your ChatGPT workspace > Apps. You can select it within ChatGPT when starting a conversation. ChatGPT will use the MCP connection to query your Matomo data and respond with insights based on your analytics. Learn more about ways to use the MCP Server.

query matomo data in chatgpt

Enable the Matomo app for your organisation

You can optionally make the app available to others in your organisation once it has been created.

  1. Open the app in ChatGPT.
  2. Click the ellipsis (three dots) menu () and select App details.
    chatgpt app details
  3. Click Enable.
    enable chatgpt app
  4. After reviewing the permissions and risks, you can choose to proceed by clicking Publish.
    publish chatgpt app

Important limitations and maintenance notes

When using the Matomo MCP integration in ChatGPT, it’s important to be aware of how tool updates are handled in ChatGPT.
If Matomo exposes new MCP tools (capabilities), these may not automatically appear in your existing configuration.
To access them, you need to go to the App’s settings in OpenAI and manually trigger a refresh of the tool list.

  1. Open the App Details.
    chatgpt app details
  2. Click on Actions: See Details.
    chatgpt app see details
  3. Click Refresh to manually update the tool list.
    manually refresh chatgpt app

You can now securely connect your analytics data to ChatGPT to query and interpret your Matomo data in real time. For more details on ChatGPT apps (connectors), refer to the official ChatGPT documentation.

Previous FAQ: Integrate the MCP Server with OpenAI Codex