Different from Docs MCP: This server queries user data. For documentation search, see Docs MCP Setup.
Architecture
The MCP server is a thin wrapper around Query API sync endpoints:Prerequisites
The Control Room account with API credentials
At least one user with granted consent
MCP Server URL
Setup by Tool
- Claude Code
- Claude Desktop
- Cursor
- VS Code
Verify Connection
After configuration, test the health endpoint:Session Credentials
The MCP server uses session-based credentials — provide them once on connection, and all tool calls use them automatically.
You can override session credentials for individual tool calls by passing
auth_token and uid as tool parameters.
Security Best Practices
Never commit credentials to git repositories
Use environment variables in configuration files
Rotate API tokens regularly via The Control Room
Use unique
uid per user (don’t share across users)Available Tools
The MCP server exposes 5 tools that map 1:1 to Query API sync endpoints:
See MCP Query Tools for detailed parameter and response documentation.
Response Format
All tools return the same structure:Pagination
Use cursor-based pagination for large datasets:Error Handling
When a tool call fails, it returns:- 401 Unauthorized: Invalid or missing credentials
- 400 Bad Request: Invalid parameters (e.g., malformed timestamp)
- 500 Internal Server Error: Query API or database error
Example Queries
- Parse your natural language query
- Select the appropriate MCP tool
- Apply filters and parameters
- Return formatted results
Troubleshooting
Empty data arrays returned
Empty data arrays returned
Cause: No data available for querySolutions:
- Data export may still be processing (watch for
data.ready/data.failedwebhooks or pollGET /export/status/{uid}until providerdata_ready: true) - User may not have data for the requested type
- Check time filters (
begin/end) aren’t excluding all data - Verify
categoryfilter isn’t too restrictive
Connection timeout
Connection timeout
Cause: Cannot reach MCP serverSolutions:
- Verify MCP server URL is exactly
https://mcp.emergedata.ai/mcp - Check firewall/network settings allow HTTPS outbound
- Test health endpoint:
curl https://mcp.emergedata.ai/mcp/health - Contact support if server appears down
Tools not appearing in AI tool
Tools not appearing in AI tool
Cause: MCP connection not establishedSolutions:
- Restart your AI tool after adding configuration
- Verify config file is in the correct location
- Check file permissions (must be readable)
- Review AI tool logs for MCP connection errors
Rate Limits
The MCP server inherits rate limits from the Query API:- Requests: 100 requests per minute per auth token
- Data: 10,000 events per request (recommended: 1000)
- Concurrent: 10 simultaneous connections per organization
Source Code
The MCP server is open-source:- Repository: github.com/emerge-protocol/emgcp
- Issues: Report bugs or request features
- License: MIT
Next Steps
Tool Reference
Detailed documentation for all 5 tools
Query Guide
Learn about sync vs async queries
Examples
See AI workflow examples
Webhooks
Track consent and data export lifecycle changes