MCP Setup Guide
This guide walks you through connecting an MCP-compatible AI client to your Pactly workspace.
Prerequisites
Section titled “Prerequisites”Before you begin, you need:
- A Pactly account with API access enabled
- A Pactly API key (generated from Settings > API Keys in the Pactly web app)
- An MCP-compatible AI client (Claude Desktop, Cursor, or any client supporting the Streamable HTTP transport)
MCP Server URL
Section titled “MCP Server URL”All clients connect to the same endpoint:
https://clientapi.pactly.ai/ai/mcpFor staging environments, use:
https://staging-api.pactly.com/ai/mcpGenerate an API Key
Section titled “Generate an API Key”- Sign in to Pactly at app.pactly.com
- Navigate to Settings > API Keys
- Click Generate New Key
- Copy the key and store it securely. You will not be able to see it again.
Claude Desktop
Section titled “Claude Desktop”Add the following to your Claude Desktop MCP configuration file (claude_desktop_config.json):
{ "mcpServers": { "pactly": { "type": "streamable-http", "url": "https://clientapi.pactly.ai/ai/mcp", "headers": { "x-api-key": "YOUR_API_KEY" } } }}Replace YOUR_API_KEY with your actual Pactly API key.
After saving, restart Claude Desktop. You should see “pactly” listed as an available MCP server.
Claude Code (CLI)
Section titled “Claude Code (CLI)”Add the server to your project’s .mcp.json file:
{ "mcpServers": { "pactly": { "type": "streamable-http", "url": "https://clientapi.pactly.ai/ai/mcp", "headers": { "x-api-key": "YOUR_API_KEY" } } }}Or add it via the CLI:
claude mcp add pactly --transport streamable-http \ --url "https://clientapi.pactly.ai/ai/mcp" \ --header "x-api-key: YOUR_API_KEY"Cursor
Section titled “Cursor”- Open Cursor and go to Settings > MCP
- Click Add new MCP server
- Enter the following:
- Name: Pactly
- Type: Streamable HTTP
- URL:
https://clientapi.pactly.ai/ai/mcp
- Add the header
x-api-keywith your Pactly API key
Other MCP Clients
Section titled “Other MCP Clients”Any client that supports the Streamable HTTP MCP transport can connect. The key configuration details:
| Setting | Value |
|---|---|
| Transport | Streamable HTTP |
| URL | https://clientapi.pactly.ai/ai/mcp |
| Authentication | x-api-key header with your API key |
| Session management | Stateless (no session ID required) |
Verify the Connection
Section titled “Verify the Connection”Once connected, try a simple command to confirm everything is working:
“Use the get_profile tool to show my Pactly account info”
You should see your name, email, role, and company name returned.
Troubleshooting
Section titled “Troubleshooting”“No company context available” error Your API key may be invalid or expired. Generate a new key from Settings > API Keys.
Connection timeout Check that your network allows outbound HTTPS connections to clientapi.pactly.ai.
Tools not appearing Restart your AI client after saving the MCP configuration. Some clients cache the tool list on startup.
Next steps
Section titled “Next steps”- Browse the full tools reference to see what you can do
- Try the sample prompts in the MCP Overview