> For the complete documentation index, see [llms.txt](https://docs.elimity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elimity.com/mcp-reference-manual/connecting-an-mcp-client.md).

# Connecting an MCP Client

Once your authorization server and MCP server are configured (see [Installation](/mcp-reference-manual/installation.md) and [Step-by-step deployment guide](/mcp-reference-manual/step-by-step-deployment-guide.md)), you can connect any MCP client that supports remote, OAuth2-authenticated MCP servers. Exact setup steps differ per client, but they all follow the same general pattern.

## What you'll need

* The MCP server URL. SaaS customers should use the URL communicated by their Elimity account manager; on-prem customers use their own `baseUrl`.
* The OAuth2 client ID and client secret created for the MCP client application in [step 1.1](https://docs.elimity.com/mcp-reference-manual/pages/JyQIwXNby2xBBLD41guW#id-1.1-setting-up-an-application-for-the-mcp-client), unless your client supports Dynamic Client Registration and your authorization server is configured to allow it.

## General setup pattern

1. Add the MCP server to your client, using the server URL above.
2. Provide your OAuth2 credentials. Depending on the client, this means either entering the client ID and secret  manually, or letting the client register itself automatically with your authorization server via Dynamic Client Registration (DCR, [RFC 7591](https://www.rfc-editor.org/rfc/rfc7591)).
3. Register the client's callback URL. Depending on the client, this is either a fixed value documented by the client (as with Claude's hosted surfaces), a value you choose yourself (as with Claude Code's local loopback callback), or a value the client generates and reveals only once you start adding the server (as with Copilot Studio). In the latter case, add the server first, copy the callback URL it shows you, then register it as an allowed redirect URI on the application you created in step 1.1, at your authorization server, before completing sign-in.

## Claude

For Claude.ai, desktop, mobile, and Cowork, go to 'Settings' → 'Connectors' → 'Add custom connector', enter the MCP server URL, then expand 'Advanced settings' to enter the client ID and secret from step 1.1. Leave 'register one automatically' unchecked unless you're relying on DCR instead. The callback URL is fixed: `https://claude.ai/api/mcp/auth_callback`.

For Claude Code, run:

```bash
claude mcp add <name> --transport http --client-id <id> --client-secret --callback-port <callback-port> <server-url>
```

Claude Code is a local client, so it uses a loopback redirect (`http://localhost:<port>/callback`) instead of a hosted callback URL. Add `--callback-port <port>` to pin it to a fixed port, and register that URL as an allowed redirect URI on the application from step 1.1, at your authorization server, instead of the one above.

## Microsoft Copilot

Go to your agent's 'Tools' page and select 'Add a tool' → 'New tool' → 'Model Context Protocol'. Enter the server name and URL, choose 'OAuth 2.0' as the authentication type and 'Manual' configuration, then fill in the OAuth2 client ID and secret from step 1.1 along with your authorization server's authorization and token endpoints (for Auth0, these are `https://<tenant>/authorize` and `https://<tenant>/oauth/token`). After selecting 'Create', Copilot Studio generates a callback URL. Register it as an allowed redirect URI on the application from step 1.1, at your authorization server, before continuing.

## Other clients

For any other MCP client, consult its own documentation for connecting to a remote MCP server with OAuth2 (sometimes listed under 'custom connector' or 'integrations'). The same general pattern applies: supply the server URL and your OAuth2 client ID and secret from step 1.1, then register whatever callback URL the client presents as an allowed redirect URI on that application, at your authorization server.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.elimity.com/mcp-reference-manual/connecting-an-mcp-client.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
