Integrate the MCP Server with ChatGPT
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:
- Access to a ChatGPT account with developer mode enabled to create apps (connectors).
- Copy your Matomo MCP endpoint URL found in Matomo Administration
(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.
- Open ChatGPT > Settings > Apps (or open Apps from the ChatGPT workspace menu)
- Click Create app.
- The New App modal will appear where you can enter the connection details for the MCP.
- Provide an easily identifiable name, for example, we recommended using Matomo Analytics.
-
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. -
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
- Click on Advanced settings to provide the OAuth 2.0 details
- Copy the Callback URL provided by ChatGPT.
- 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.
- Paste the Callback URL (copied from ChatGPT) into the OAuth client settings in the Redirect URIs field.
- Save the OAuth client and copy the Client ID and Client secret as you will need to provide those credentials in ChatGPT.
- Return to the browser window with the ChatGPT App.
- In the OAuth advanced settings, paste the Client ID and Client secret copied from the OAuth client settings in Matomo.
- The Token endpoint auth method will automatically update to client_secret_post once the credentials are entered.
- 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. - 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 - Provide the Token URL for your Matomo OAuth 2.0 server, for example:
https://$MATOMO_DOMAIN/index.php?module=OAuth2&action=token
- 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.
- If applicable, click on the checkbox to confirm that you understand the ChatGPT security notice and want to continue.
- Click Create.
- 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.
Enable the Matomo app for your organisation
You can optionally make the app available to others in your organisation once it has been created.
- Open the app in ChatGPT.
- Click the ellipsis (three dots) menu (⋯) and select App details.
- Click Enable.
- After reviewing the permissions and risks, you can choose to proceed by clicking Publish.
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.
- Open the App Details.
- Click on Actions: See Details.
- Click Refresh to manually update the tool list.
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.