Skip to content

feat(mcp): add/remove rank tracking keywords - #144

Open
Alexi5000 wants to merge 1 commit into
every-app:mainfrom
Alexi5000:feat/mcp-rank-tracking-write
Open

feat(mcp): add/remove rank tracking keywords#144
Alexi5000 wants to merge 1 commit into
every-app:mainfrom
Alexi5000:feat/mcp-rank-tracking-write

Conversation

@Alexi5000

Copy link
Copy Markdown

Related to #125

Problem

Agents can read rank trackers via get_rank_tracker, but cannot add or remove tracked keywords without leaving MCP for the dashboard.

Fix

  • add_rank_tracking_keywordsRankTrackingService.addKeywords, with a schedule-aware projected check cost (queued vs live) after the add
  • remove_rank_tracking_keywordsRankTrackingService.removeKeywords by trackingKeywordId
  • No auto triggerCheck / metrics refresh (avoids silent credit spend)
  • Out of scope: create/update config, triggerCheck

Verification

  • pnpm exec prettier --write on touched MCP files
  • pnpm exec vitest run src/server/mcp/tools/rank-tracking-write-tools.test.ts
  • pnpm exec tsc --noEmit
  • pnpm exec oxlint on touched files (--type-aware)

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
web-site-profile pushed a commit to web-site-profile/open-seo that referenced this pull request Jul 23, 2026

@sorcerai sorcerai left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Blocking correctness issue: remove_keywords returns removed=args.keywordIds.length, but the repository silently ignores stale/foreign IDs and duplicate IDs can overcount. The MCP response can therefore claim deletions that did not happen. Please return the actual affected-row count or reject/report non-owned IDs, and cover stale, foreign, and duplicate inputs. Project authorization and no-provider-call ordering otherwise look sound.

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.

2 participants