Search documentation

Search documentation

MCP Server

The MCP channel exposes your agent as a Model Context Protocol server. AI IDEs like Cursor and Claude Desktop can connect to it and use your agent's tools and knowledge directly in their workflows.

Setup

  1. Go to Agents in the dashboard
  2. Click Add Agent and select MCP Server
  3. Copy the MCP Server URL shown after creation

The server URL looks like https://mcp.trypillar.com/your-agent-slug/mcp.

Authentication

MCP agents support two authentication methods:

API keys

Create API keys in the dashboard under Agents > [your agent] > Channel Settings > Authentication. Pass the key in the Authorization header when configuring your MCP client.

OAuth

For per-user authentication, configure OAuth in Channel Settings > OAuth Configuration:

SettingDescription
Authorization EndpointYour OAuth provider's authorization URL
Token EndpointYour OAuth provider's token exchange URL
Client IDOAuth client ID
Client SecretOAuth client secret
ScopesSpace-separated list of OAuth scopes to request
User ID ClaimJWT claim to use as the user identifier (e.g., sub, email)
Require OAuthWhen enabled, all MCP clients must authenticate via OAuth

Custom domain

You can serve the MCP endpoint from your own domain. Set the Custom Domain field in Channel Settings to your domain (e.g., mcp.yourapp.com) and configure a CNAME record pointing to mcp.trypillar.com.

IDE setup

Cursor

Add to your .cursor/mcp.json:

json
{
"mcpServers": {
"your-agent": {
"url": "https://mcp.trypillar.com/your-agent-slug/mcp",
"headers": {
"Authorization": "Bearer your-api-key"
}
}
}
}

Claude Desktop

Add to your claude_desktop_config.json:

json
{
"mcpServers": {
"your-agent": {
"url": "https://mcp.trypillar.com/your-agent-slug/mcp",
"headers": {
"Authorization": "Bearer your-api-key"
}
}
}
}

If OAuth is configured, the IDE handles the OAuth flow automatically when connecting.

Next steps