Unidy Docs

Connect an MCP client

Connect an agent to the tenant's v2 API with delegated OAuth or an API key.

Unidy serves an MCP endpoint at https://YOUR_BRAND_HOST/api/v2/mcp. It uses Streamable HTTP and JSON responses. Your administrator must enable both API v2 and its MCP capability on the intended instance.

MCP tools call the same operations as the HTTP API. They retain resource permissions, brand restrictions, feature checks, validation and audit behavior.

Connect with OAuth

  1. Add the full MCP URL to your client's remote-server or connector configuration.
  2. Choose OAuth when the client supports it. Follow the Unidy sign-in and consent screens.
  3. Confirm the requested access is api_v2, the client identity and the instance before consenting.
  4. Start with a read such as finding an available operation or counting accessible users.

The server publishes protected-resource metadata at /.well-known/oauth-protected-resource/api/v2/mcp. Its authentication challenge points clients there. Authorization-server discovery advertises dynamic client registration at /oauth/registration; compatible clients register automatically and use Authorization Code with S256 PKCE.

If a client lets you select scopes explicitly, request api_v2. Requesting all advertised scopes can fail. OAuth access follows the signed-in user's current roles and allowed brands. Some account-security and ticket-moving operations refuse delegated OAuth even if a tool is listed; see /me restrictions.

Connect with an API key

For clients that support a fixed authorization header, configure:

text
URL: https://YOUR_BRAND_HOST/api/v2/mcp
Authorization: Bearer YOUR_API_KEY

Create a dedicated key with the smallest required permissions and brand set. The agent acts as the key, rather than as the person operating the client. Keep the token in the client's private credential configuration.

Find and call a tool

search_api finds operations and schemas; explain_api returns a selected operation's full definition. API tool names derive from operation IDs, such as data_users_index.

ArgumentSource
Path and query argumentsThe operation's parameter names.
bodyThe request body, including its payload.data envelope for JSON writes.
brandThe X-Unidy-Brand header, using a permitted brand name.
path_brandA path parameter named brand, where an operation has one.

To count accessible users, use the users list tool with page: 1 and per_page: 0. There is no separate count tool. Filters narrow the result as they do over HTTP.

Server instructions name up to 20 allowed brands and the default request-host brand. Use only permitted names; this list is an orientation aid, not a replacement for authorization or a complete directory on larger instances. The connector title and logo reflect the request-host brand.

API failures are returned as tool errors carrying the API error envelope. Check identifier, details and meta.request_id before correcting a call. After an uncertain write, read the affected resource before asking the agent to repeat it.

Troubleshooting and revocation

SymptomCheck
Endpoint returns 404Exact instance URL, enabled API v2/MCP capabilities, and the brand host.
OAuth reports an invalid scopeRequest api_v2 and use a compatible Authorization Code/PKCE client.
Connected but no usable toolsInspect the client's tool-discovery error; a connected transport alone does not establish a usable integration.
Tool returns 403Current roles, enabled feature and delegated-OAuth restrictions.
Brand lookup returns 404Exact permitted brand name; omit an empty brand argument.

Users can inspect and revoke authorized applications on their Services page. Administrators manage API keys separately. Revoking an OAuth connection does not revoke an independently configured API key.

Was this page helpful?