AI agents (MCP)
Let an AI agent work on the platform for you through the MCP server, connected with OAuth or a personal token, with your role and nothing more.
What it does
tprm.mlab.sh runs an MCP server at
<PUBLIC_URL>/mcp (Streamable HTTP, JSON-RPC 2.0). An AI agent connected to it
(Claude, ChatGPT, Cursor, Claude Code...) can read and update your providers,
contracts, assessments, register and the rest, and export or validate the
register, as the user who connected it:
- every tool goes through the same API as the web interface: organization lock, license gating, roles and the activity log apply unchanged;
- a Viewer's agent reads and exports only;
*_updatetools change only the fields the agent passes;- fields with a closed list of values (statuses, criticality, ICT service types
eba_TA:S01-S19...) carry that list in the tool schema, so an agent cannot invent a code the register would reject.
Connect with OAuth (recommended)
Nothing to copy: the application sends you to your instance to sign in and allow it.
- In the AI application, add a remote MCP server with the URL
https://<your-instance>/mcp.- Claude: Settings, Connectors, Add custom connector.
- Claude Code:
claude mcp add --transport http tprm https://<your-instance>/mcp
- The application opens tprm.mlab.sh. Sign in, with your password or single sign-on.
- The consent page shows the application, your account and organization, your role and where you will be sent back. Choose Allow.
The connection appears in Account settings, AI agents (MCP), Connected applications, where Revoke cuts it off at once.
Set PUBLIC_URL to the https address of the instance. The authorization
server announces it as its issuer; without it, it uses the address each request
came to, which is fine for a test instance only.
How it is secured
tprm.mlab.sh is its own OAuth 2.1 authorization server; nothing goes through mlab.sh.
| Part | Rule |
|---|---|
| Discovery | /mcp answers 401 with WWW-Authenticate: Bearer resource_metadata=... (RFC 9728), which leads to /.well-known/oauth-protected-resource and /.well-known/oauth-authorization-server (RFC 8414). |
| Registration | POST /oauth/register (RFC 7591). Public clients only, no secret. |
| Redirect URIs | https, or http on localhost, 127.0.0.1 or [::1] (any port, for applications running on your machine). No fragment. An unregistered URI is never followed: the error is shown on tprm.mlab.sh. |
| PKCE | S256, required on every authorization. |
| Consent | The form is bound to your session and to that request, so another site cannot submit it for you; the page cannot be framed. |
| Codes | Single use, 10 minutes, bound to the client, the redirect URI and the PKCE challenge. A code used twice revokes what its first use gave. |
| Access tokens | 1 hour. |
| Refresh tokens | 30 days, rotated on each use. Replaying a refresh token already rotated revokes the whole connection. |
| Revocation | From Account settings, or POST /oauth/revoke (RFC 7009). |
| Per application | Up to 3 connections per user and application (several machines); the oldest goes beyond. |
Connections and revocations are written to the activity log.
Personal tokens
For an agent that cannot sign in with OAuth (a script, a CI job), create a token
in Account settings, AI agents (MCP), Personal tokens and send it as
Authorization: Bearer mcp_.... It acts as you until you revoke it; treat it like
a password.
claude mcp add --transport http tprm https://<your-instance>/mcp \
--header "Authorization: Bearer mcp_..."What to watch
- Records hold text written by people and third parties. The server tells agents to treat it as data, never as instructions; review what an agent proposes before it writes, as you would any automation.
- An agent inherits the role of the user who connected it. Give an agent that only needs to read the account of a Viewer.
Single sign-on
Sign in with mlab.sh, or through your identity provider with OpenID Connect - Microsoft Entra ID, Okta, Google, Keycloak - with accounts created at first sign-in.
Public footprint (mlab.sh)
See the third parties visible from a provider's public domain - mail and SaaS services, hosting, DNS, certificates and what its website loads - with an mlab.sh domain scan.