Example 1: Generate integration code
You ask:“Generate TypeScript and Python code to create a signed Emerge link and handle the callback”AI response (with MCP connection): The AI searches the docs, finds the Create Links and Callbacks pages, and generates code that keeps
uid server-side (never user input):
Example 2: Understand data availability
You ask:“What data can I get from Emerge and how soon after consent?”AI response: The AI finds the Query Overview and Webhooks pages:
- Data is available after export completes. Poll
GET /export/status/{uid}and wait until the required provider insources[]isdata_ready: true. - Until a provider is ready, sync queries may return empty results. Handle this gracefully and retry with backoff.
Example 3: Debug a webhook signature issue
You ask:“My webhook signature verification is failing. What am I doing wrong?”AI response: The AI checks Webhooks and points out the most common issues:
- Raw body required - sign the raw request body, not parsed JSON.
- Header name - use the
x-signatureheader. - Comparison - use constant-time comparison to avoid subtle mismatches.
Example 4: Plan a nightly sync
You ask:“I want to sync Emerge data to my database nightly. What’s the best approach?”AI response: The AI finds Pagination and Query Overview: Recommended approach:
- Use delta queries with
ingested_beginto fetch new data since the last run. - Page with
cursoruntilhas_moreis false. - Store
applied_ingested_endas your nextingested_begin.
Example 5: Choose sync vs async for mobile
You ask:“Should I use sync or async queries for my mobile app?”AI response: For mobile apps, sync queries are recommended because they return JSON immediately and are simpler to integrate. Your mobile app should call your backend, not the Query API directly.
Example 6: Query user data via MCP
These examples show using the Query API MCP server to directly query consented user data from AI tools. This is different from the documentation MCP - it provides real data access.Setup required: These examples require the Query API MCP server with valid credentials (
auth_token and uid).Analyze user interests from search history
Analyze user interests from search history
Using Claude Code with Query API MCP configured:What happens:
- Claude calls
get_search_datatool with date range filter - Receives search history data grouped by category
- Analyzes query frequency and patterns
- Returns insights with specific examples
Generate personalized content recommendations
Generate personalized content recommendations
Using Cursor AI chat with Query API MCP configured:What happens:
- AI calls
get_youtube_dataandget_browsing_datatools - Identifies themes and recurring interests
- Cross-references patterns across data sources
- Generates topic suggestions with rationale
Build user insights dashboard
Build user insights dashboard
Using Claude Desktop with Query API MCP:What happens:
- AI calls multiple MCP tools in parallel (
get_search_data,get_youtube_data,get_browsing_data) - Aggregates and analyzes data across sources
- Identifies patterns and trends
- Formats results as structured summary
Delta sync for data warehouse
Delta sync for data warehouse
Using Claude Code to generate sync script:What happens:
- Claude accesses Query API MCP tool documentation
- Generates script using
get_search_datawith delta query parameters - Implements pagination with
cursorandhas_morehandling - Uses
ingested_beginfor incremental updates
- Loads last sync timestamp from state file
- Calls MCP tool with
ingested_beginparameter - Pages through all results
- Saves
applied_ingested_endfor next sync
Try it yourself
For documentation help (Docs MCP):
- “How do I implement retry logic for Emerge API calls?”
- “What happens if a user revokes consent?”
- “Generate a React component that shows a Connect Data button”
- “Show the correct way to handle uid without asking the user”
For querying user data (Query API MCP):
- “Show me search patterns for the last week”
- “What categories is this user most interested in?”
- “Compare browsing and YouTube activity to find common interests”
- “Generate a weekly activity report”