Skip to content

feat(mcp): expose topic suggestions via list/accept/dismiss tools - #513

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:feature/mcp-topic-suggestions
Jul 23, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:feature/mcp-topic-suggestions

Conversation

@d180

@d180 d180 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Agents connected via MCP could list topics and prompts but had no way to see
or act on the AI-generated topic suggestions added in #497 — accepting or
dismissing one required switching to the web dashboard.

This adds three MCP tools: list_topic_suggestions, accept_topic_suggestion,
and dismiss_topic_suggestion, plus matching REST twins under
/api/mcp/topic-suggestions/* (mirroring the pattern every other MCP
capability in this codebase already follows). Accept creates exactly one
topic via a singular insert (never a bulk replace) and both accept/dismiss
are scoped to status = 'new', so acting on an already-decided suggestion
returns not-found instead of silently double-processing or creating a
duplicate topic. Generating new suggestions stays out of scope — that
remains plan-gated behind the UI's refresh button.

Verified end-to-end against a local Supabase instance: correct org isolation
(wrong-org calls return not-found), and a real MCP client (Claude Code)
connected over the Streamable HTTP endpoint successfully listed and accepted
a live suggestion.

Related issue

Closes #498

Type of change

  • feat — New feature

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/)
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean work — all four acceptance criteria met, org isolation done right. Thanks!

@gkhngyk
gkhngyk merged commit c1e64fe into ansvisor:main Jul 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP: expose topic suggestions (list / accept / dismiss)

2 participants