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
- Go to Agents in the dashboard
- Click Add Agent and select MCP Server
- 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:
| Setting | Description |
|---|---|
| Authorization Endpoint | Your OAuth provider's authorization URL |
| Token Endpoint | Your OAuth provider's token exchange URL |
| Client ID | OAuth client ID |
| Client Secret | OAuth client secret |
| Scopes | Space-separated list of OAuth scopes to request |
| User ID Claim | JWT claim to use as the user identifier (e.g., sub, email) |
| Require OAuth | When 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:
{"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:
{"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
- Setting Up Tools — Configure which tools are available to MCP clients
- Defining Tools — Create server-side tools that MCP clients can call