Connect your agent
Connect Claude Desktop, Cursor, VS Code or Claude Code to Pie over MCP, the Model Context Protocol. Then ask your agent in plain language to run tests, read results and manage issues.
Before you start
- Open your app in Pie and run it at least once, so your agent has something to read.
- Install Node.js if you use Claude Desktop, because its config runs
npx. - Use Claude Desktop, Cursor, VS Code or Claude Code. To compare working from an agent with the portal and the API, see Choose how to use Pie.
Create an API key
In Pie, go to Settings > API Keys and select Create API Key, or Add if the app already has a key. Enter a Name, such as Claude Integration, and select Create. Select Copy, confirm that you saved the key and select Done.
Add Pie to your client
Pick your client and add the block. Replace YOUR_API_KEY_HERE with the key you copied.
Open Claude Desktop, go to Settings > Developer > Edit Config and add Pie to the configuration file.
{
"mcpServers": {
"pie": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.pie.inc",
"--header",
"X-API-Key: YOUR_API_KEY_HERE"
]
}
}
}On Windows, replace npx with npx.cmd.
Open Cursor settings, go to the MCP configuration file and add Pie.
{
"mcpServers": {
"pie": {
"url": "https://mcp.pie.inc",
"headers": {
"X-API-Key": "YOUR_API_KEY_HERE"
}
}
}
}Open VS Code settings, find the MCP servers configuration and add Pie. Pass the key in the X-API-Key header, as you would for Cursor or Claude.
{
"servers": {
"pie": {
"url": "https://mcp.pie.inc",
"headers": {
"X-API-Key": "YOUR_API_KEY_HERE"
}
}
}
}Run this command in your terminal:
claude mcp add --transport http pie https://mcp.pie.inc \
--header "X-API-Key: YOUR_API_KEY_HERE"Restart your client
Claude Desktop: save the file, quit Claude completely, not only the window, and start it again. Cursor: save the file and restart Cursor. VS Code: save the file and reload VS Code.
Make your first call
In your agent, type:
Fetch PieWhat you’ll see
Your agent answers with an overview of your app, including test runs, coverage and active issues. Claude Desktop may first ask you to allow the Pie tool: choose Allow once or Always allow.
If nothing comes back, see Fix a Server disconnected error.
Connect more than one app
Each app has its own key. Give each connection its own name in the config, then name the one you mean when you prompt.
{
"mcpServers": {
"pie-staging": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.pie.inc",
"--header",
"X-API-Key: STAGING_API_KEY"
]
},
"pie-production": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.pie.inc",
"--header",
"X-API-Key: PRODUCTION_API_KEY"
]
}
}
}Replace STAGING_API_KEY and PRODUCTION_API_KEY with the key for each app.
Fix a Server disconnected error
Claude Desktop shows Server disconnected when it can’t start the Pie connection. Work through these checks in order.
- Install Node.js. The config runs
npx, which comes with it. A missing install is the most common cause. - Check every local path in the config. Use forward slashes. On Windows, use
npx.cmd. - Quit Claude Desktop completely. On Windows, end it in Task Manager, then start it again. Closing the window isn’t enough.
- Check the JSON for missing commas or brackets, and that the key is in quotes with no extra spaces.
- Confirm your Claude plan allows MCP servers.
If your agent connects but returns no data, run at least one test in Pie and check that you named the right app. If Pie rejects the key, create a new one under Settings > API Keys, update the config and restart. For more, see Troubleshooting.