Repository navigation
feat(mcp): expose prompts and topics through MCP tools and REST endpoints - #35
Merged
Merged
Conversation
…ints
Adds two new tools / endpoints to the MCP surface so Claude can
inspect a brand's prompt coverage and drill into individual prompts,
not just visibility totals. This unlocks the next layer of useful
questions ("are my topics balanced?", "what's in my pricing topic?",
"any inactive or mis-targeted prompts?") that were impossible to
answer with list_brands + get_visibility_summary alone.
What's new:
- list_topics(brand_id) — returns each topic on the brand with a
prompt_count, computed in one round-trip rather than N+1.
- list_prompts(brand_id, topic_id?, is_active?, limit?) — returns
prompt text, joined topic name, platforms, models, regions, active
flag. Default limit 100, max 500, newest first.
Both tools live alongside the existing two on the same Streamable
HTTP endpoint and share a single data layer with their parallel REST
sub-routes (/api/mcp/topics, /api/mcp/prompts). Every call goes
through the same ownership check — the brand must belong to the
caller's organization — before any data is read.
The ansvisor-aeo-coach skill (MCP) and ansvisor-aeo-coach-standalone
skill (REST) both pick up two new workflows on top of the tools:
prompt coverage audit (flags empty / under-covered / over-
concentrated topics with a single-suggestion next step) and prompt
deep-dive (resolves a topic by name, lists its prompts with the
operational signals a marketer cares about — platforms, models,
active flag — and flags effectively-silent prompts).
Mintlify guide updated so the public docs reflect the new tool
surface; api-reference for /api/mcp/* is still a gap and tracked
separately.
This was referenced May 26, 2026
Merged
4 of 12 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New tools
Both ride on the existing Streamable HTTP MCP endpoint and share a single data layer with their REST sub-routes (`/api/mcp/topics`, `/api/mcp/prompts`). Every call goes through the same ownership check — brand must belong to caller's organization — before any data is read.
New skill workflows
Both `ansvisor-aeo-coach` (MCP) and `ansvisor-aeo-coach-standalone` (REST) skills pick up two new opinionated workflows:
Docs
Test plan