Before you begin
You need:- A workspace owner or admin account
- A gateway that supports HTTP MCP and the OAuth
client_credentialsflow - A secret manager for the client ID and secret
Set up access
1
Choose your regional endpoints
Use every URL from the same row:
Credentials created for one region do not work in the other region.
2
Create a service client
- In ClosedLoop AI, open Settings → MCP access.
- Click Create service client.
- Enter a name that identifies the gateway or workload using it.
- Copy the client ID and client secret into your secret manager.
3
Configure your gateway
Set these values in your gateway:
Use
client_secret_basic when your gateway lets you choose the client authentication method. ClosedLoop AI also supports client_secret_post.If your gateway sends an OAuth resource value, set it to the exact regional MCP URL. Gateways that omit resource are supported.4
Test the connection
Ask the gateway to list the available tools, then call a read-only tool such as
get_overview.A successful connection does not open a browser. The gateway receives a one-hour token with the mcp:read scope and must fetch a new one when it expires.LiteLLM example
Store the service-client values asCLOSEDLOOP_MCP_CLIENT_ID and CLOSEDLOOP_MCP_CLIENT_SECRET, then add the matching regional configuration to config.yaml:
https://mcp.closedloop.sh and https://mcp.closedloop.sh/token.
LiteLLM fetches, caches, and renews access tokens automatically. To verify the setup, open the MCP entry in LiteLLM, list its tools, and call get_overview.
Rotate or revoke credentials
- Access tokens expire after one hour. Service-client secrets expire after 180 days.
- ClosedLoop AI notifies workspace owners and admins in Settings → MCP access 30 and 7 days before a secret expires.
- When you rotate a credential, its existing secret remains valid for at most 24 hours. Update the gateway, verify the new secret, then revoke the old credential.
- Revoking a credential immediately invalidates its issued access tokens. Revoking a service client immediately invalidates all its credentials and tokens.
Troubleshooting
MCP Overview
Set up interactive clients and learn how MCP access works.
Core tools reference
Browse core tools and their parameters.