Skip to main content

MCP connection and behavior

Owlie has a Model Context Protocol (MCP) server, so an AI client outside the dashboard can read and change your organization's data with tools. The client connects with an API key and acts as that key's service account. What it can do is what the service account's roles allow.

Before you connect​

Changes made over MCP run immediately. Owlie shows no approval card and asks no person to confirm, as the dashboard assistant does for sensitive actions (Permissions and human approvals). The service account's roles are the only control, so decide them before you hand a client the key:

  • Create a service account for the client alone, with its own key. Don't share a key between a script and an AI client.
  • Give it read-only roles if the client only needs to answer questions.
  • Add a role that can change something only when the client needs to change it. A client with a role that can modify identities can modify any identity, at any time, on the model's own judgment.

The developer quickstart shows how to create a key and assign roles.

Connect​

SettingValue
URLhttps://<your Owlie domain>/api/mcp, for example https://acme.owlie.com/api/mcp
TransportStreamable HTTP
AuthenticationAn Authorization header: Bearer <API key>

Clients differ in how they take these settings. Many read a JSON configuration like this one:

{
"mcpServers": {
"owlie": {
"type": "http",
"url": "https://acme.owlie.com/api/mcp",
"headers": { "Authorization": "Bearer <your API key>" }
}
}
}

Check your client's documentation for its exact format. The client needs to support a remote server over HTTP with a custom header. Owlie's server does not use OAuth sign-in: the key in the header is the whole credential.

To check the connection yourself, list the tools:

curl -X POST "https://acme.owlie.com/api/mcp" \
-H "Authorization: Bearer $OWLIE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }'

Then ask the client to call owlie_whoami. It returns the id of the service account the calls run as, and works even when the service account has no roles.

How the server behaves​

  • One request, one answer. The client sends each JSON-RPC message as a POST, and the server answers with JSON. It keeps no session between requests, so there is nothing to reconnect or resume, and every request carries the key.
  • No server-initiated messages. The server never opens a stream to the client. A GET on the URL answers 405.
  • Tools only. The server supports initialize, ping, tools/list and tools/call. It has no MCP resources or prompts.
  • One message a request. A batch of several JSON-RPC messages in one request is not accepted.
  • Protocol versions. The server speaks MCP revisions 2025-06-18 and 2025-03-26. A client that asks for another revision is answered with 2025-06-18.

Each call is authorized on its own against the service account's current roles. A change to those roles needs no reconnection.

Tools​

Find out what is possible​

ToolDoes
owlie_whoamiReturns the identity the calls run as.
owlie_describeLists the methods available inside owlie_execute, with each one's arguments. It also returns guides on topics such as grants, requests, reviews, policies, sync, provisioning, filters and pagination.
owlie_schemaLooks up part of the GraphQL schema: search for a phrase, describe one type, or follow a field path.

Run a program against Owlie​

owlie_execute runs a short TypeScript program that the model writes. Inside it, an owlie object has a method for each operation, such as owlie.identities_list({ ... }), and the program returns the final result:

async () => {
const page = await owlie.identities_list({ filter: { department: "Finance" }, limit: 50 });
return page.data.map((identity) => identity.email);
};

The program runs in a sandbox with no network access. Its only way out is the owlie object, and every method on it goes through the API as the service account. This is the tool for anything that lists, filters, counts or takes several steps: one program does the whole job in one call.

A list method returns one page and never a total. To count, the program calls the matching count or stats method, such as owlie.identities_count. owlie_describe lists them.

Read, create and update one object​

ToolsDoes
owlie_get_identity, owlie_get_group, owlie_get_resource, owlie_get_request, owlie_get_role, owlie_get_ticket, owlie_get_review_itemRead one object by id.
owlie_create_identity, owlie_create_group, owlie_create_resource, owlie_create_requestCreate one object.
owlie_update_identity, owlie_update_group, owlie_update_resource, owlie_update_roleChange one object.

Single actions​

ToolsArea
owlie_add_group_to_group, owlie_remove_group_from_groupGroup nesting
owlie_process_request, owlie_remind, owlie_reassign_approval_stepRequests
owlie_extend_review_due_dateAccess reviews
owlie_trigger_sync, owlie_retry_sync_runSync
owlie_create_provisioning_operation, owlie_reconcile_assigned_resource, owlie_retry_assigned_resourceProvisioning
owlie_update_resource_grant_targets, owlie_update_resource_profiles, owlie_update_grant_target_risk, owlie_update_grant_target_review_policyResource configuration
owlie_update_tenant, owlie_update_settingsOrganization settings

tools/list returns every tool with its description and the arguments it takes, so a client always has the current set.

No tool approves or rejects an approval ticket, or records an access review decision. Those decisions belong to the people they are assigned to.

What a tool call can change​

A tool that changes something does it as soon as it is called, if the service account's roles allow it. A program in owlie_execute can make several changes in one call.

A role the service account lacks is the only thing that stops a change. The call then fails with an authorization error, and the model sees it as the tool's result. To let a person decide instead, keep the changing role off the service account. Then have the client prepare the change for someone to make in the dashboard, or use the dashboard assistant, which asks for approval.

Owlie records a change made over MCP under the service account, marked via Agent over MCP. Verify assistant actions describes where to look.

Errors​

What you seeMeaning
HTTP 401 with { "message": "Not Authorized" }The key is missing, wrong, expired or revoked, or its service account is disabled. Nothing ran.
A tool result with isError: trueThe tool ran and failed. The text starts with the error's code, such as AUTHORIZATION_ERROR: Not authorized for identity.modify.
JSON-RPC error -32602The tool name is unknown, or the arguments don't match the tool's input: a missing or unexpected property, or a wrong type.
JSON-RPC error -32601The method is not one the server supports.
JSON-RPC error -32700, with HTTP 400The request body is not valid JSON.

A failed tool is reported inside the result on purpose, so the model can read the reason and correct its next call. Errors and API limits explains the error codes.