Connect an AI Client (MCP)
This guide connects an MCP client to the Trimble Connect Files and Topics MCP servers on production. For what the servers do, see the MCP overview.
Before you begin
Section titled “Before you begin”- A Trimble ID with access to at least one Trimble Connect project.
- API credentials for a Trimble Identity application. Request them with the Request for API Credentials form (see step 1).
- An MCP host that supports Streamable HTTP and static OAuth client credentials (Cursor, Claude, VS Code), or a way to get a user token for scripts.
| Connect | https://app.connect.trimble.com |
| MCP base | https://cloud.mcp.trimble.com |
| Identity | https://id.trimble.com |
1. Request API credentials
Section titled “1. Request API credentials”Trimble Identity applications for the MCP servers are set up by Trimble. Fill in the Request for API Credentials form, and include the following in your request.
-
Grant type: ask for Authorization Code Grant. Client Credentials isn’t supported, because tools must run as a user.
-
Scopes: list the scopes for the servers you’ll use:
Server Scopes Files openid connect-mcp-files connectTopics openid connect-mcp-topics connectBoth openid connect-mcp-files connect-mcp-topics connect -
Sign-In Redirect URL: list the redirect URI of every host you’ll use. Identity rejects the login if the URI the host redirects to isn’t registered.
Host Redirect URIs Claude https://claude.ai/api/mcp/auth_callbackhttps://claude.com/api/mcp/auth_callbackCursor http://localhost:8787/callbackcursor://anysphere.cursor-mcp/oauth/callbackInclude every URI listed for a host. Which one a host uses depends on its version and platform.
-
When your request is approved, you receive the application’s client ID and client secret. These go in the MCP client config. They are not the bearer token: the host uses them to get a user token through a browser login.
2. Configure your client
Section titled “2. Configure your client”Add both servers to use files and topics in the same session.
Add the servers to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global). See Cursor MCP (static OAuth).
{ "mcpServers": { "connect-data-mcp": { "url": "https://cloud.mcp.trimble.com/tc-files/v1/mcp", "auth": { "CLIENT_ID": "<client id>", "CLIENT_SECRET": "<client secret>", "scopes": ["openid", "connect-mcp-files", "connect"] } }, "connect-topics-mcp": { "url": "https://cloud.mcp.trimble.com/tc-topics/v1/mcp", "auth": { "CLIENT_ID": "<client id>", "CLIENT_SECRET": "<client secret>", "scopes": ["openid", "connect-mcp-topics", "connect"] } } }}Cursor opens a browser, you sign in, and Cursor sends the resulting user token to /mcp.
Add each MCP URL as a custom connector and enter the client ID and secret you received:
- Files:
https://cloud.mcp.trimble.com/tc-files/v1/mcp - Topics:
https://cloud.mcp.trimble.com/tc-topics/v1/mcp
Your credentials must include the Claude redirect URIs (https://claude.ai/api/mcp/auth_callback and https://claude.com/api/mcp/auth_callback), or the browser login never returns to Claude.
Use .vscode/mcp.json with root key servers and "type": "http". If your host doesn’t do OAuth, pass a user token in headers:
{ "servers": { "connect-files": { "type": "http", "url": "https://cloud.mcp.trimble.com/tc-files/v1/mcp", "headers": { "Authorization": "Bearer <access_token>" } } }}Get a user-context token yourself (see Get Started for token concepts and refresh), then POST JSON-RPC to the endpoint:
curl -s -X POST "https://cloud.mcp.trimble.com/tc-files/v1/mcp" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -H "Authorization: Bearer <access_token>" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Call a tool with "method":"tools/call" and "params":{"name":"<tool>","arguments":{…}}.
3. Make your first call
Section titled “3. Make your first call”-
Ask the client to list its tools. You should see
connect_*tools from each server you added. -
Try a prompt:
- Files: “List my Connect projects.”
- Topics: “List topics for project
<id>in regionus.”
-
If a project isn’t found, ask again with another region (
eu,uk,ap,ap2). Each call searches one region only.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause and fix |
|---|---|
UNAUTHENTICATED | The Authorization header didn’t reach the server. Check the host config. |
UNAUTHORIZED | Token invalid, expired, wrong environment, or the Identity token exchange failed. Sign in again; check the scopes. |
401 with WWW-Authenticate | No token sent. The header points to the server’s RFC 9728 metadata (see below). |
Incompatible auth server: does not support dynamic client registration | Cursor has no auth.CLIENT_ID. Add it to mcp.json (an unset ${env:…} variable causes this too). |
| Browser login never returns to the host | That host’s redirect URI isn’t registered as a Sign-In Redirect URL for your credentials. Request it with the Request for API Credentials form. |
| Cursor still uses the old config | Fully quit and reopen Cursor. |
| Project not found | Wrong region. Call again with another region. |
Protected-resource metadata:
- Files:
GET https://cloud.mcp.trimble.com/tc-files/v1/.well-known/oauth-protected-resource - Topics:
GET https://cloud.mcp.trimble.com/tc-topics/v1/.well-known/oauth-protected-resource
Security notes
Section titled “Security notes”- Send the token only in the HTTP
Authorizationheader. Never pass it as a tool argument. - Keep the client secret out of shared repositories. Prefer a global config or environment variables for anything committed.
Still stuck? See Help and Feedback.