Sign in to Pactly, open the account menu, and go to Account Settings.
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).
Server endpoint
Section titled “Server endpoint”All clients connect to the same endpoint over the stateless Streamable HTTP transport:
https://app.pactly.ai/api/mcpThe host is app.pactly.ai. There is no separate session to manage. Each request opens a fresh transport, so no session ID is required.
Prerequisites
Section titled “Prerequisites”- 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).
Option A: API key
Section titled “Option A: API key”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.
Create an API key
Section titled “Create an API key”Select the API Keys section.
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.
Configure Claude Desktop
Section titled “Configure Claude Desktop”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.
Configure Claude Code
Section titled “Configure Claude Code”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:
claude mcp add pactly --transport streamable-http \ --url "https://app.pactly.ai/api/mcp" \ --header "x-api-key: YOUR_API_KEY"Configure Cursor
Section titled “Configure Cursor”In Cursor, open Settings and go to the MCP section.
Click Add new MCP server.
Set Name to Pactly, Type to Streamable HTTP, and URL to https://app.pactly.ai/api/mcp.
Add a header named x-api-key and set its value to your Pactly API key. Save, and Pactly appears as an available server.
Any other MCP client
Section titled “Any other MCP client”Any client that supports the Streamable HTTP transport can connect with these details:
| Setting | Value |
|---|---|
| Transport | Streamable HTTP |
| URL | https://app.pactly.ai/api/mcp |
| Authentication | x-api-key header with your API key |
| Session management | Stateless (no session ID) |
Option B: OAuth 2.1
Section titled “Option B: OAuth 2.1”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: Bearerheader rather thanx-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.
Verify the connection
Section titled “Verify the connection”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.
Troubleshooting
Section titled “Troubleshooting”“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.
Related
Section titled “Related”Chat with us
We typically reply within a few minutes