<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Matomo MCP Server plugin: Bearer token auth fails because Authorization header is not available as HTTP_AUTHORIZATION]]></title><description><![CDATA[<p dir="auto">Hi Cloudron team,</p>
<p dir="auto">I tested the official Matomo MCP Server plugin with the Cloudron Matomo app and ran into what looks like an Apache/PHP auth header issue.</p>
<h2>Environment</h2>
<ul>
<li>Cloudron: <code>9.1.7</code></li>
<li>App: Matomo</li>
<li>App package: <code>org.piwik.cloudronapp@1.57.0</code></li>
<li>Matomo: <code>5.10.0</code></li>
<li>MCP plugin: <code>McpServer</code> <code>5.0.3</code></li>
<li>Plugin source: <a href="https://github.com/matomo-org/plugin-McpServer" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/matomo-org/plugin-McpServer</a></li>
<li>Plugin requirement: Matomo <code>&gt;=5.8.0-rc1,&lt;6.0.0-b1</code>, PHP <code>&gt;=8.1.0</code></li>
</ul>
<h2>What I did</h2>
<p dir="auto">I installed the plugin into:</p>
<pre><code class="language-text">/app/data/plugins/McpServer
Then ran:

php /app/code/console plugin:install-or-update McpServer --no-interaction
php /app/code/console plugin:activate McpServer --no-interaction
php /app/code/console core:clear-caches
Matomo now sees the plugin:

McpServer | Optional | Activated
MCP is enabled in the plugin settings:

enable_mcp=1
maximum_mcp_access_level=view
raw_api_access_scope=none
Expected behavior
According to the Matomo plugin documentation, MCP clients authenticate by sending:

Authorization: Bearer &lt;token_auth&gt;
to:

/index.php?module=API&amp;method=McpServer.mcp&amp;format=mcp
A valid Matomo token_auth should therefore not be rejected with 401 by the MCP endpoint.

Actual behavior
Unauthenticated request:

401 Authentication required
This is expected and confirms that the MCP endpoint exists.

Authenticated request with a valid Matomo token_auth as Bearer token:

401 Authentication required
The same token works with the normal Matomo Reporting API, so the token itself is valid.

Likely cause
It looks like Apache/PHP inside the Cloudron Matomo app does not pass:

Authorization: Bearer ...
through as:

$_SERVER["HTTP_AUTHORIZATION"]
Matomo core supports Bearer token extraction from HTTP_AUTHORIZATION, and the MCP plugin seems to depend on that.

A common Apache fix would be something like:

SetEnvIf Authorization "^(.*)$" HTTP_AUTHORIZATION=$1
CGIPassAuth On
But in the Cloudron app container, /app/code and /etc/apache2/conf-enabled are read-only, so this cannot be patched persistently from inside the running app.

Request
Could the Cloudron Matomo package include the required Apache/PHP configuration so Authorization is passed through to PHP as HTTP_AUTHORIZATION?

That would make the official Matomo MCP Server plugin usable on Cloudron with Bearer token authentication.

Thanks!</code></pre>
]]></description><link>https://forum.cloudron.io/topic/15486/matomo-mcp-server-plugin-bearer-token-auth-fails-because-authorization-header-is-not-available-as-http_authorization</link><generator>RSS for Node</generator><lastBuildDate>Tue, 05 May 2026 16:48:39 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/15486.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 05 May 2026 08:19:43 GMT</pubDate><ttl>60</ttl></channel></rss>