MCP API Reference
Connect AI assistants like Claude, ChatGPT, Cursor, and more to AEO Optima via the Model Context Protocol (MCP).
Overview
AEO Optima exposes a Model Context Protocol (MCP) server that allows AI assistants to access your brand visibility data, capture snapshots, run analytics, and more — all without leaving your AI tool.
Server URL: https://aeo-optima-mcp.onrender.com/mcp
Transport: Streamable HTTP (JSON-RPC over HTTP POST)
Authentication: Bearer token or OAuth 2.1
Getting Started
There are two ways to connect your AI client to AEO Optima:
Option A: Manual Token (Recommended — works everywhere)
- Log in to the AEO Optima dashboard
- Go to Settings > MCP / API
- Click Generate New Token
- Give it a name (e.g., "Claude Desktop") and select a role cap
- Copy the token immediately — it's shown only once
- Paste the token into your AI client's configuration (see Client Configuration below)
Option B: OAuth 2.1 (Click-to-connect)
Some AI clients (like Claude Desktop) support OAuth, which lets you connect with a single click — no token copying needed. When you click "Connect" in your AI client:
- A browser window opens with the AEO Optima login page
- You log in (or are already logged in)
- A consent screen shows what the AI client is requesting
- You pick your organization and approve
- You're redirected back — connection is automatic
OAuth discovery endpoints:
- Authorization Server Metadata:
https://aeo-optima.vercel.app/.well-known/oauth-authorization-server - Protected Resource Metadata:
https://aeo-optima-mcp.onrender.com/.well-known/oauth-protected-resource
OAuth supports PKCE (required), Dynamic Client Registration, refresh tokens, and token revocation.
Client Configuration
Replace aeo_YOUR_TOKEN with the token you generated from Settings > MCP / API.
Claude Desktop
Go to Settings > Connectors > Add Remote MCP Server and enter:
- Name:
aeo-optima - URL:
https://aeo-optima-mcp.onrender.com/mcp - Authorization Token: Your
aeo_...token
Claude Desktop also supports OAuth — it will auto-discover the authorization server and guide you through the consent flow.
Claude Code (CLI)
Cursor
Create or edit .cursor/mcp.json in your project root:
Windsurf
Edit ~/.codeium/windsurf/mcp_config.json:
VS Code + Copilot
In VS Code 1.99+, go to Settings > MCP Servers and add:
- Type:
http - URL:
https://aeo-optima-mcp.onrender.com/mcp - Headers:
Authorization: Bearer aeo_YOUR_TOKEN
ChatGPT / OpenAI
In Developer Mode, go to MCP Servers and add the server URL with your Bearer token.
Google Gemini
Google Gemini supports MCP at the SDK level. Add AEO Optima as a remote MCP server with the server URL and Bearer token.
Amazon Q Developer
In your CLI config or IDE plugin settings, add the MCP server URL with your Bearer token as a header.
OpenAI Agents SDK (Python)
Anthropic API (Direct)
Use the mcp_servers parameter in the Messages API:
Authentication
AEO Optima supports two authentication methods. Both produce a Bearer token that is sent with every MCP request.
Method 1: Manual Tokens
Generated from the Settings page. Format: aeo_ + 48 random hex characters (52 characters total).
- SHA-256 hashed before storage — plaintext is never stored
- Optional expiration dates for time-limited access
- Can be revoked at any time from the Settings page
- Scoped to a specific user + organization
Method 2: OAuth 2.1
OAuth tokens are generated automatically through the browser-based consent flow. Format: oat_ + 48 random hex characters.
OAuth supports:
- Authorization Code + PKCE (S256 only) — no client secrets needed
- Dynamic Client Registration (RFC 7591) — AI clients auto-register
- Refresh Tokens — access tokens auto-renew without re-authorization
- Token Revocation (RFC 7009) — revoke access or refresh tokens
- Scopes:
mcp:tools,mcp:resources,mcp:prompts
Role Hierarchy
Both token types have a role cap that limits what they can do, regardless of the user's actual role:
| Role | Read Data | Write Data | View Costs | Admin Tools |
|---|---|---|---|---|
| viewer | Projects, snapshots, analytics, prompts, models | No | No | No |
| member | Everything a viewer can + usage/cost data | Capture snapshots, create/update prompts, analyze pages | Yes | No |
| admin | Everything | Everything a member can | Yes | No |
| owner | Everything | Everything | Yes | No |
The effective permission is always the minimum of the token's role cap and the user's actual organization role.
Tools (65)
The MCP server exposes 74 tools across 29 categories. Tools that require a feature flag (Advanced Analytics, GEO Audit, GA4, GSC, Webhooks, Connectors, Citations, Crawlers, Content, Predictive, Enterprise, Query Universe) only work for organizations whose plan includes the corresponding feature.
Projects (2)
| Tool | Description | Min Role |
|---|---|---|
list_projects | List all projects in your organization | viewer |
get_project | Get detailed project info (brand, competitors, LLM configs) | viewer |
Snapshots (3)
| Tool | Description | Min Role |
|---|---|---|
get_snapshots | Retrieve snapshots with filters (date, model, sentiment, brand mention) | viewer |
get_snapshot_detail | Get full AI response text and analysis for a snapshot | viewer |
capture_snapshot | Capture new AI responses for a prompt across models (rate limit: 10/hr) | member |
Analytics (4)
| Tool | Description | Min Role |
|---|---|---|
get_dashboard_metrics | KPI summary: visibility %, sentiment, rank, week-over-week changes | viewer |
get_analytics | Visibility trends, LLM comparison, prompt performance | viewer |
get_usage_metrics | Token usage and cost breakdown by provider, model, day | member |
get_sentiment_breakdown | Sentiment analysis by prompt and model | viewer |
Advanced Analytics (3) — ai_insights_advanced feature flag
| Tool | Description | Min Role |
|---|---|---|
get_entity_analysis | Brand attribute extraction from snapshots, clarity scoring (0-100), verified against brand facts. Accepts optional segment parameter. | viewer |
get_shopping_visibility | Shopping keyword detection, position tracking, price accuracy, competitor analysis. Accepts optional segment parameter. | viewer |
get_multi_language_analysis | Per-language visibility, character-range detection (CJK/Arabic/Cyrillic), localized recommendations. Accepts optional segment parameter. | viewer |
Segment filtering: All analytics tools —
get_dashboard_metrics,get_analytics,get_sentiment_breakdown,get_entity_analysis,get_shopping_visibility,get_multi_language_analysis,get_visibility_forecast,detect_anomalies,analyze_citation_gaps, andgenerate_report— accept an optionalsegmentparameter (all,branded,non-branded, orcompetitor) to filter by prompt type. All REST API analytics endpoints also accept?segment=as a query parameter.
Prompts (3)
| Tool | Description | Min Role |
|---|---|---|
list_prompts | List monitoring prompts for a project (includes topic) | viewer |
create_prompt | Create a new monitoring prompt | member |
update_prompt | Update prompt text, type, topic, priority, or active status | member |
Page Analysis (1)
| Tool | Description | Min Role |
|---|---|---|
analyze_page | Analyze a URL for AEO score (0-100) across 6 categories with improvement suggestions | member |
Models (1)
| Tool | Description | Min Role |
|---|---|---|
list_models | List available AI models from the dynamic registry, optionally filtered by provider | viewer |
Alerts (1)
| Tool | Description | Min Role |
|---|---|---|
get_alerts | Check for visibility drops, sentiment shifts, capture failures, rank changes | viewer |
AI Analysis (2)
| Tool | Description | Min Role |
|---|---|---|
run_analysis | Run AI-powered analysis: sentiment_drivers, content_gaps, opportunity_scoring, comprehensive | member |
get_analysis_results | Retrieve completed AI analysis results for a project | viewer |
Actions (2)
| Tool | Description | Min Role |
|---|---|---|
list_actions | List insight actions (auto-generated from AI analysis or manual) | viewer |
update_action | Update an action's status (pending, in_progress, completed, dismissed) or notes | member |
Plan & Quotas (1)
| Tool | Description | Min Role |
|---|---|---|
get_plan_info | Get organization plan, feature flags, quota limits, and current usage counts | viewer |
GEO Audit (2)
| Tool | Description | Min Role |
|---|---|---|
run_geo_audit | Run a Generative Engine Optimization audit on a URL — scores schema, entity clarity, FAQ structure, content depth, technical SEO, freshness | member |
list_geo_audits | List past GEO audit results for a project | viewer |
GA4 (2)
| Tool | Description | Min Role |
|---|---|---|
get_ai_traffic | Get AI referral traffic data from Google Analytics 4 (sessions, users, pageviews from ChatGPT, Perplexity, Claude, Gemini) | viewer |
get_ga4_status | Check GA4 connection status for a project | viewer |
GSC (2)
| Tool | Description | Min Role |
|---|---|---|
get_search_performance | Get Google Search Console data (clicks, impressions, CTR, position) for top queries | viewer |
get_gsc_status | Check Google Search Console connection status for a project | viewer |
Webhooks (2)
| Tool | Description | Min Role |
|---|---|---|
list_webhooks | List webhook endpoints registered for the organization | admin |
get_webhook_deliveries | Get recent delivery logs for a webhook endpoint | admin |
Citation Intelligence (3)
| Tool | Description | Min Role |
|---|---|---|
get_citations | Get citation sources for a project with aggregated counts and category breakdowns | viewer |
analyze_citation_gaps | Identify sources that cite competitors but not your brand — actionable outreach targets | member |
get_domain_authority | Get domain authority scores for citation sources (frequency, recency, cross-model presence) | viewer |
Crawler Intelligence (2)
| Tool | Description | Min Role |
|---|---|---|
get_crawler_dashboard | AI bot monitoring dashboard — activity logs, blocked/allowed status, detected patterns | viewer |
analyze_robots | Analyze robots.txt and ai.txt for AI bot configuration with recommendations | viewer |
Content Intelligence (3)
| Tool | Description | Min Role |
|---|---|---|
generate_faqs | Generate FAQ content from project prompts and brand facts (suitable for FAQ schema) | member |
generate_schema_markup | Generate JSON-LD structured data for a URL using brand facts and page content | member |
get_corrections | Get hallucination correction submissions (drafts, submitted, resolved) | viewer |
Connectors (2)
| Tool | Description | Min Role |
|---|---|---|
list_connectors | List registered connectors (Serper, DataForSEO, Slack, Looker, Zapier, Shopify) | admin |
manage_connector | Create, test, sync, or delete a connector | admin |
Predictive & Edge (3)
| Tool | Description | Min Role |
|---|---|---|
get_visibility_forecast | Visibility forecast via Holt-Winters ensemble (level + trend + weekly seasonality) with bootstrap-calibrated 95% prediction intervals. Returns winning model, cross-validated RMSE/MAE/MAPE, coverage probability, Ljung-Box residual test, and confidence quality rating. Accepts optional segment parameter. | viewer |
detect_anomalies | Completeness-aware z-score anomaly detection on visibility, sentiment, and mention-rate metrics. Skips partial-capture days (≥80% completeness + ≥10 snapshots required), excludes today, applies Bonferroni correction for 3 simultaneous tests, marks persistent when 2+ consecutive points anomalous. Accepts optional segment parameter. | viewer |
get_benchmarks | Compare project visibility against industry benchmarks (percentile rank) | viewer |
Enterprise (2)
| Tool | Description | Min Role |
|---|---|---|
get_audit_logs | SOC 2 compliance audit logs for an organization (user actions, data access, config changes) | admin |
get_revenue_attribution | Multi-touch revenue attribution: first_touch, last_touch, linear, time_decay, position_based | viewer |
Query Universe (6)
| Tool | Description | Min Role |
|---|---|---|
list_building_blocks | List building blocks for a project grouped by category (Core services, Modifiers) | viewer |
manage_building_blocks | Create, update, or delete building blocks | member |
compose_prompts | Generate prompt suggestions from building blocks (cap: 200) | member |
get_coverage_report | Get or regenerate Query Universe coverage report (dimension distributions, gaps, recommendations) | viewer |
seed_building_blocks | Seed building blocks from industry templates | member |
backfill_prompts | Enrich existing prompts with enhanced classification (intent, journey stage, freshness, risk, SDS tier) | member |
Reports (6)
| Tool | Description | Min Role |
|---|---|---|
generate_report | Generate an AEO report for a project. Supports multiple formats (PDF, slide PDF, Excel, CSV) and report types (executive, standard, comprehensive, competitive). Returns report ID, download URL, AI brand score, and letter grade. | member |
get_report_history | Get report generation history for a project. Returns past reports with metadata, scores, and download URLs. | viewer |
get_report_download | Get a signed download URL for a specific report. URL expires after 1 hour. | viewer |
create_report_share | Create a shareable link for a report. Supports optional password protection, expiry, and comment permissions. | member |
list_report_shares | List all shared report links for a project, including view counts and status. | member |
revoke_report_share | Revoke (deactivate) a shared report link. The link will no longer be accessible. | admin |
Goals (3)
| Tool | Description | Min Role |
|---|---|---|
list_goals | List visibility goals with milestones and pace status. Filter by status or segment. | viewer |
create_goal | Create a goal with auto-computed milestones. Supports 7 metrics across 4 segments. Returns feasibility assessment. | member |
update_goal | Update a goal's target, date, status, or notes. | member |
Insights (2)
| Tool | Description | Min Role |
|---|---|---|
list_insights | List intelligence insights generated by computation engines. Filter by type (11 types), severity, or status. | viewer |
update_insight | Acknowledge, dismiss, or convert an insight to an action. | member |
Intelligence (3)
| Tool | Description | Min Role |
|---|---|---|
get_intelligence_scores | Get all 6 intelligence scores: BNCI, CMCS, MEI, SDI, CIPS, ETAS. | viewer |
get_intelligence_summary | Get unified intelligence summary with KPIs, timeline, recommendations, and action counts. | viewer |
verify_action | Trigger scoped measurement for completed actions. Compares visibility before/after to measure real impact. | member |
Quick Audit (1)
| Tool | Description | Min Role |
|---|---|---|
quick_audit | Run a 3-model brand check (ChatGPT, Claude, Gemini). Returns which models mention the brand with excerpts. | viewer |
Admin — Customer (2)
| Tool | Description | Min Role |
|---|---|---|
get_health_report | System health check across all platform components | platform_admin |
get_platform_stats | Platform-wide statistics (orgs, users, projects, snapshots, costs) | platform_admin |
Admin — Platform (5)
| Tool | Description | Min Role |
|---|---|---|
get_cockpit_overview | Platform cockpit dashboard — balance, runway, worker health, cost anomalies | platform_admin |
manage_org_credits | Allocate or adjust credits for a customer organization | platform_admin |
pause_org | Pause or resume a customer organization's capture access | platform_admin |
get_cost_intelligence | Granular cost breakdown by org, project, user, provider, or time period | platform_admin |
manage_killswitches | Enable or disable platform-wide killswitches for capture, analysis, or email | platform_admin |
All admin tools are only available to users whose email is listed in the PLATFORM_ADMIN_EMAILS environment variable.
Resources (10)
Resources are read-only data endpoints your AI assistant can browse for context. Two are static; the other eight are templated by ID.
| URI | Description |
|---|---|
aeo://projects | List of all projects in your organization |
aeo://models | All available AI models grouped by provider |
aeo://projects/{id}/summary | Project summary with key metrics |
aeo://projects/{id}/snapshots/recent | Last 10 snapshots for a project |
aeo://projects/{id}/competitors | Competitor list for a project |
aeo://projects/{id}/geo-audits | Recent GEO audit results for a project |
aeo://projects/{id}/ai-traffic | AI referral traffic summary for a project |
aeo://projects/{id}/actions | Pending insight actions for a project |
aeo://organizations/{id}/plan | Current plan, limits, and feature flags |
aeo://models/{provider} | Models from a specific provider |
Prompts (6)
Prompt templates generate structured reports from your data.
| Prompt | Description | Arguments |
|---|---|---|
weekly_report | Weekly AI visibility report with trends, highlights, recommendations | project_id |
competitor_analysis | Competitor comparison: share of voice, overlap, rankings | project_id, days? |
content_recommendations | Content improvement suggestions from snapshot analyses | project_id, limit? |
visibility_summary | Quick current-state summary with today's metrics and alerts | project_id |
geo_optimization | GEO optimization plan based on the latest audit results | project_id |
ai_traffic_analysis | Analyze AI referral traffic trends with growth strategies | project_id, days? |
Rate Limits
| Limit | Scope |
|---|---|
| 60 requests / minute | Per token, all tools |
| 1,000 requests / hour | Per token, all tools |
| 10 captures / hour | Per token, capture_snapshot only |
When rate limited, the tool returns an error with a retryAfter value in seconds.
Error Handling
Tool errors are returned as content with isError: true:
| Status Code | Meaning |
|---|---|
| 401 | Missing, invalid, expired, or revoked token |
| 403 | Insufficient role or cross-org access denied |
| 404 | Resource not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Audit Logging
Every tool call is logged for security and usage tracking:
- Who: Token, user, organization
- What: Tool name, input parameters (sanitized)
- When: Timestamp and duration
- Result: Success or error
Audit logs are viewable by organization admins.
Example Conversations
Check Mention Rate & Visibility Score
You: How is my brand doing on AI search engines today?
AI (calls
list_projectsthenget_dashboard_metrics): Your brand "TechShu" has a 30% mention rate and a Visibility Score of 49/100 across AI search engines today, with a sentiment score of 72%. Average rank position is 3.2, up from 3.5 last week.
Capture a Snapshot
You: Run a snapshot for my "best CRM software" prompt
AI (calls
list_promptsto find the prompt, thencapture_snapshot): Captured responses from 8 AI models. Your brand was mentioned in 3 out of 8 responses. Sentiment was positive in 2 and neutral in 1.
Weekly Report
You: Generate my weekly visibility report
AI (invokes
weekly_reportprompt): Here's your weekly report for TechShu AEO Tracking...
OAuth 2.1 Developer Reference
If you're building an MCP client or integration that needs OAuth (rather than static tokens), here are the technical details.
Discovery
Your client should first fetch the Protected Resource Metadata to find the authorization server:
Then fetch the Authorization Server Metadata:
Dynamic Client Registration
Register your client automatically (RFC 7591):
Redirect URIs must be either localhost (any port) or HTTPS.
Authorization Flow
- Generate a PKCE code verifier (43-128 character random string) and its S256 challenge
- Redirect the user to the authorization endpoint:
- User logs in, sees the consent screen, picks their organization and role cap, and approves
- User is redirected to your
redirect_uriwith?code=AUTH_CODE
Token Exchange
Exchange the authorization code for tokens:
Response:
Refresh Tokens
When the access token expires, use the refresh token to get a new one:
Token Revocation
Revoke an access token or refresh token (RFC 7009):
Always returns HTTP 200, regardless of whether the token was valid.
OAuth Scopes
| Scope | What It Grants |
|---|---|
mcp:tools | Access to all 65 MCP tools |
mcp:resources | Access to all 10 MCP resources |
mcp:prompts | Access to all 6 MCP prompt templates |
All three scopes are granted by default if no scope is specified.
Compatibility
| Platform | Auth Methods | Status |
|---|---|---|
| Claude Desktop | Bearer token, OAuth | Supported |
| Claude Code (CLI) | Bearer token | Supported |
| ChatGPT / OpenAI | Bearer token, OAuth | Supported |
| Cursor | Bearer token | Supported (all 74 tools) |
| Windsurf | Bearer token | Supported |
| VS Code + Copilot | Bearer token, OAuth | Supported (v1.99+) |
| Google Gemini | Bearer token, OAuth | Supported (SDK-level) |
| Amazon Q Developer | Bearer token | Supported |
| OpenAI Agents SDK | Bearer token | Supported |
| Anthropic API | Bearer token | Supported |