Skip to main content
WisePilot exposes its full surface area through 8 domain pairs ({domain}_explore + {domain}_query) plus 4 atomic orchestration tools. This is the recommended way to use the MCP server from Claude, ChatGPT projects, or any MCP client — the agent discovers operations dynamically rather than memorizing 100+ individual tool names.
The legacy atomic tools (e.g. get_conversation_metrics, list_assets, list_ad_creatives) are still registered and continue to work. New integrations should prefer the explore/query pattern below — it scales better as we add capabilities.

How It Works

Every domain has the same two tools:
  1. {domain}_explore — browse what’s available. Returns a category list with operation counts. Drill into a category to see operations with full param schemas + examples.
  2. {domain}_query — execute one operation. Takes { operation, params }.
The agent only needs to remember 16 tool names (8 explore + 8 query) rather than 100+ atomic tools, and discovery is self-documenting.

The 8 Domains

intelligence

Lifecycle state, work items, content opportunities, AI insights, hypothesis test runs, confirmed learnings, pattern candidates, attribution rollups, runner stats. 12 ops across 4 categories.

metrics

GHL conversations / appointments / revenue, Google + Meta Ads, GSC, GA4, GBP, content/CTA performance, client snapshot. 22 ops across 6 categories.

ads

Google Ads + Meta Ads catalog and performance: creatives, ad sets, keywords, search terms, daily timeseries, summaries. 10 ops across 3 categories.

content

Library reads: assets, blogs, CTAs, nurture sequences, sequence steps, entities, opportunities, full-text search. 10 ops across 4 categories.

brand

Brand position, guidelines, ICPs, hooks & angles, messaging learnings, operating profile, design tokens, color palettes, image styles, brand subjects. 10 ops across 2 categories.

ghl

GHL CRM browse: conversations + messages, appointments, pipeline stages, opportunities. 5 ops across 3 categories.

seo_research

Ahrefs-backed: keyword ideas, bulk metrics, SERP analysis, competitor keywords. Each call consumes Ahrefs credits. 4 ops across 2 categories.

integration

Connection state (WordPress, GHL, ad platforms), GHL agents/prompts/KBs/contacts, ad campaigns, sync trigger. 7 ops across 4 categories.

The 4 Atomic Orchestration Tools

These are stateful or composed actions that don’t fit the “browse + execute” pattern.

dispatch_lifecycle

Open or resume a content lifecycle session. Given a content type and intent, returns a chat session id, the current step, the chat hint for that step, and a deep-link URL.
Intents: create (new entity), edit (resume edit lifecycle), optimize (ad ops), review (approval review), approve (approval gate). Permission: write_staging (or approve for intent: "approve").

promote_learning

Promote a pattern_candidate to a durable confirmed_learning. Human-in-the-loop step at the end of the hypothesis-iteration pipeline.
Guards: win_count >= 2, avg_confidence >= 0.6, no active duplicate (overrideable). Permission: approve.

request_wp_engineer_work

File an engineering task into the unified inbox under label='engineer_work'. Use this when the agent identifies a problem requiring WP / theme / plugin / infra changes (not a content edit).
Permission: write_staging.

get_image_brief

Composed read returning a brand-aligned brief that any image-gen client (ChatGPT’s built-in image gen, Claude’s image renderer) can hand off. Bundles brand position + design tokens + color palette + image style + brand subjects + suggested prompt prefix + do/don’t lists.
For server-side image generation (lifecycle-attached, persisted), use the legacy generate_image tool. Permission: read.

Permission Scopes

API keys carry one or more permissions. Each operation declares which it requires; the MCP server returns 403 PERMISSION_DENIED when missing. Existing pre-v1 keys are auto-granted all four permissions for backward compatibility. New keys can be scoped to a subset (read-only, write-staging-no-approve, etc).

Authentication

The MCP endpoint at https://ai.wisepilot.app/api/v1/mcp accepts:
  • OAuth 2.1 + PKCE — Claude.ai, Claude Desktop, Claude Code use this. Identity-tied, automatic refresh.
  • API key (Bearer) — ChatGPT projects, custom MCP clients, scripts. Authorization: Bearer cr_.... Created in Settings → API Keys.
API keys can also carry an expires_at and a monthly image-gen budget counter, both enforced at the middleware layer.

Common Patterns

Discovery before execution

When unsure which operation to call, always _explore first.

Date ranges (metrics, ads, ghl)

All time-bounded operations accept the same shape:

Pagination

limit + offset on every list-style op. Defaults to 50 items, max 200 for most operations. SEO research and image briefs cap differently — see explore output for per-op limits.

Error shapes

Every error returns a structured payload the LLM can parse:
Common codes: INVALID_PARAMS, UNKNOWN_OPERATION, PERMISSION_DENIED, MISSING_WEBSITE_SCOPE, FORBIDDEN_WEBSITE, RATE_LIMIT_EXCEEDED, API_KEY_EXPIRED.

Migration from atomic tools

If you have an existing integration using the per-tool API (e.g. get_conversation_metrics, list_ad_creatives): The legacy tools remain registered — there’s no rush. Migrate when you’re updating the integration anyway.

Reference

  • Strategy doc: docs/mcp-tool-surface-strategy.md (rationale, design decisions, future domains)
  • Reference implementation: /Code/base-microservices/apps/open-data/ — the proven explore/query pattern this is based on
  • Source: src/features/public-api/server/mcp/router/ (generic dispatcher) and src/features/public-api/server/mcp/domains/* (one folder per domain)