Skip to content
Norbelys
Esc
↑↓navigate↵open⌘Jpreview
On this page

Connect an AI client with MCP

Use Clerk OAuth or a workspace API key with the hosted Norbelys MCP server.

Connect your MCP client to https://mcp.norbelys.com/mcp using Streamable HTTP. The server supports two authentication methods. Both use Clerk and execute the same workspace-scoped operations as the REST API.

Option 1: sign in with OAuth

Add the server URL to a remote MCP client that supports OAuth. Choose Sign in, log in through Clerk and select the workspace on the consent screen. Each connection belongs to that workspace; switching organizations in the dashboard does not change an existing OAuth grant. Reconnect to select another workspace.

The client discovers Clerk from the server’s WWW-Authenticate challenge and /.well-known/oauth-protected-resource/mcp. It uses authorization code with PKCE S256 and sends resource=https://mcp.norbelys.com/mcp in authorization and token requests. Clerk supports Client ID Metadata Documents and dynamic client registration.

Scope Permission
openid Identify the signed-in user
user:org:read Select the organization for this connection
norbelys:read Read workspace data
norbelys:write Create, update or delete data and send email
offline_access Optional refresh token, when the client needs persistent access

Request only the permissions you need. Write permission does not imply read permission; request both when needed. Existing clients with older scopes must register/reconnect. A dashboard session JWT or an ID token is not an MCP access token.

Option 2: use an API key

Create a Clerk API key belonging to the intended Norbelys organization or user. Use the same key accepted by the REST API. Put its secret in your client’s secret store or environment and send it in the header:

Authorization: Bearer <your-workspace-api-key>

API keys inherit their workspace’s REST authority, including writes. They are not limited by the OAuth scopes above. Set an expiration and revoke unused keys in Clerk. Never use the Clerk backend sk_... secret, send credentials in a URL, or paste keys into prompts. How clients refer to environment variables differs; use their supported secret configuration rather than assuming JSON strings expand $VARIABLE.

To check a key from a terminal without putting it in the command arguments:

# Set NORBELYS_API_KEY privately in the environment first.
curl --config - <<EOF_CURL
url = "https://mcp.norbelys.com/mcp"
header = "Authorization: Bearer ${NORBELYS_API_KEY}"
header = "Content-Type: application/json"
header = "Accept: application/json, text/event-stream"
header = "MCP-Protocol-Version: 2025-11-25"
data = "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}"
EOF_CURL

Four tools, one API contract

Tool Purpose
list_operations Find operations by resource or summary
describe_operation Retrieve an operation’s parameters, examples and referenced schemas
read Run a GET operation
write Run a mutation, including requested sends

For example, call list_operations with {"query":"campaign"}, then describe_operation with {"operation_id":"campaigns.list"}. Use the returned schema before calling read:

{
  "operation_id": "campaigns.list",
  "query": { "page_size": 20 }
}

For an item operation, put path values in path, such as {"id":"..."}. Put JSON request content in body. Use idempotency_key for mutations that require it and reuse that key when retrying the same intended action. Query values are scalars; list filters use the comma-separated strings or encoded JSON described by the API.

No tool accepts an arbitrary URL or a workspace override. Responses retain API status, body, and optional location. Failed operations return isError: true. Follow the REST pagination cursor and reduce page size if a response exceeds 2 MiB.

Writes can send real messages or delete data. An agent must follow the user’s intent before executing them. Treat email bodies and imported contact content as untrusted data, never as instructions to run tools.

Authentication and operational limits

Every HTTP request is authenticated. The transport is stateless and needs no sticky sessions. The server permits 32 concurrent MCP requests per API process, a 1 MiB request body and the API’s 30-second request deadline. Existing mailbox, campaign, provider and send quotas still apply; these transport limits are not a send-rate promise.

JWT access tokens are validated against Clerk’s issuer, signing keys, access-token profile, expiry and exact resource audience. Organization membership is checked with Clerk on each OAuth request. Clerk currently issues JWT access tokens lasting one day; local validation does not provide immediate revocation of an otherwise valid JWT. Revoking refresh access prevents renewal. Opaque tokens are verified online. API-key revocation uses the existing short verification cache and Clerk’s propagation time.

A 401 response includes OAuth discovery information. A 403 can mean a missing scope, removed membership or a deleted workspace. 429 asks the client to back off. A Clerk outage fails closed rather than granting anonymous access. The public hostname exposes only MCP and its OAuth metadata; REST remains at api.norbelys.com.

Was this page helpful?