Skip to content

Connect an AI Client (MCP Setup)

Your team already works in an AI client like Claude or Cursor, and you want it to answer questions against your real contract data instead of copy-pasted snippets. Pactly’s MCP server exposes a read-only, company-scoped set of tools that any MCP-compatible client can call.

This guide connects a client to that server. It covers two authentication paths: an API key (fastest, good for a single user or a local config) and OAuth 2.1 (used by hosted connectors like Claude.ai’s remote MCP).

All clients connect to the same endpoint over the stateless Streamable HTTP transport:

https://app.pactly.ai/api/mcp

The host is app.pactly.ai. There is no separate session to manage. Each request opens a fresh transport, so no session ID is required.

  • A Pactly account on app.pactly.ai.
  • An authentication credential: either a Pactly API key (steps below) or an OAuth 2.1 client (for hosted connectors).
  • An MCP-compatible client that supports the Streamable HTTP transport (Claude Desktop, Claude Code, Cursor, and others).

Use an API key when you are configuring a single client or a local config file. The key authenticates every request through the x-api-key header.

Step 1 of 3
1
Open Account Settings

Sign in to Pactly, open the account menu, and go to Account Settings.

2
Go to API Keys

Select the API Keys section.

3
Create the key

Click Create New API Key, name it, and confirm. The key is shown only once. Copy it and store it securely; you will not be able to view it again.

Step 1 of 3

Add the server to your Claude Desktop MCP configuration file (claude_desktop_config.json):

{
"mcpServers": {
"pactly": {
"type": "streamable-http",
"url": "https://app.pactly.ai/api/mcp",
"headers": {
"x-api-key": "YOUR_API_KEY"
}
}
}
}

Replace YOUR_API_KEY with the key you created. Save the file and restart Claude Desktop. You should see pactly listed as an available MCP server.

Add the server to your project’s .mcp.json:

{
"mcpServers": {
"pactly": {
"type": "streamable-http",
"url": "https://app.pactly.ai/api/mcp",
"headers": {
"x-api-key": "YOUR_API_KEY"
}
}
}
}

Or add it from the CLI:

Terminal window
claude mcp add pactly --transport streamable-http \
--url "https://app.pactly.ai/api/mcp" \
--header "x-api-key: YOUR_API_KEY"
Step 1 of 4
1
Open MCP settings

In Cursor, open Settings and go to the MCP section.

2
Add a new MCP server

Click Add new MCP server.

3
Enter the connection details

Set Name to Pactly, Type to Streamable HTTP, and URL to https://app.pactly.ai/api/mcp.

4
Add the API key header

Add a header named x-api-key and set its value to your Pactly API key. Save, and Pactly appears as an available server.

Step 1 of 4

Any client that supports the Streamable HTTP transport can connect with these details:

SettingValue
TransportStreamable HTTP
URLhttps://app.pactly.ai/api/mcp
Authenticationx-api-key header with your API key
Session managementStateless (no session ID)

Hosted connectors (for example, Claude.ai’s remote MCP) authenticate with OAuth 2.1 instead of a static key. You do not paste a key into these clients; you add the server URL and the client walks you through sign-in.

Pactly supports the full OAuth 2.1 flow against the same endpoint:

  • Authorization code with PKCE. Standard MCP authorization-code flow.
  • Dynamic client registration. The MCP client registers itself, so there is no manual app setup in Pactly.
  • Bearer tokens. Requests carry the issued token in the Authorization: Bearer header rather than x-api-key.

To connect a hosted client, add https://app.pactly.ai/api/mcp as a remote MCP server in that client and follow its sign-in prompts.

The available OAuth scopes are contracts:read, playbooks:read, clauses:read, and profile:read, matching the read-only tool set described above.

Once connected, run a simple prompt to confirm the tools are reachable:

“Use the get_profile tool to show my Pactly account info.”

You should see your name, email, role, and company returned.

“No company context available.” The credential is invalid or expired. For API keys, create a new one in Account Settings then API Keys. For OAuth, reconnect and have an admin approve consent.

OAuth consent is blocked. Approving the connection requires an admin or master role. Ask an admin to authorize the client, or switch to an API key.

Connection timeout. Confirm your network allows outbound HTTPS to app.pactly.ai.

Tools not appearing. Restart your client after saving the configuration. Some clients cache the tool list on startup.

Requests rejected under load. The server rate-limits per API key (a small number of concurrent requests with a short queue). Back off and retry if you see 429 responses.

Chat with us

We typically reply within a few minutes