Skip to content

feat: migrate to Rust MCP server and update skill-bench tests#59

Open
sonesuke wants to merge 14 commits intomainfrom
feat/rust-mcp-server-and-test-updates
Open

feat: migrate to Rust MCP server and update skill-bench tests#59
sonesuke wants to merge 14 commits intomainfrom
feat/rust-mcp-server-and-test-updates

Conversation

@sonesuke
Copy link
Copy Markdown
Owner

Summary

  • Migrate from multiple external MCP servers (google-patent-cli, arxiv-cli) to a single unified patent-kit MCP server built in Rust with 24 tools
  • Move plugin directory from plugin/ to claude-plugin/ with proper .claude-plugin structure for correct MCP server registration
  • Consolidate sub-skills (investigation-fetching, investigation-recording, investigation-preparing) into parent skill workflows
  • Update all skill-bench E2E test references to match new architecture (MCP tool checks instead of skill checks)
  • Fix concept-interviewing SKILL.md to call check_assignee as MCP tool instead of invoking as a skill

Test plan

  • cargo test passes
  • cargo clippy passes
  • npx prettier passes
  • CI pipeline passes
  • skill-bench: 10/22 tests pass (up from 6/22 before test fixes), remaining failures are LLM behavior issues

🤖 Generated with Claude Code

web-flow and others added 14 commits April 19, 2026 02:15
Move from multiple external MCP servers (google-patent-cli, arxiv-cli)
to a single unified patent-kit MCP server built in Rust. Consolidate
sub-skills (investigation-fetching, investigation-recording, investigation-preparing)
into parent skills and update all skill-bench E2E test references accordingly.

- Move plugin from plugin/ to claude-plugin/ with proper .claude-plugin structure
- Add Rust MCP server (patent-kit mcp) with 24 tools for patent operations
- Remove obsolete sub-skills, merged into parent skill workflows
- Update skill-bench tests: replace skill-loaded/skill-invoked checks for
  deleted skills with mcp-success checks for corresponding MCP tools
- Fix concept-interviewing SKILL.md to call check_assignee as MCP tool
  instead of invoking it as a skill

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…instructions

- Move MCP server definition from plugin.json to .mcp.json so Claude Code
  properly exposes MCP tools to the LLM in --print mode
- Fix marketplace.json source path to ./claude-plugin
- Unify all SKILL.md files to use consistent "Call the <tool> MCP tool directly"
  format instead of code block syntax
- Add IMPORTANT admonitions against using Bash to invoke MCP tools

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Prevent zombie Chromium processes from accumulating by explicitly
dropping searcher/arxiv and running pkill after MCP server stops.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ements

- Defer patents.db creation until first DB access (lazy init via Mutex<Option<Database>>)
- Add --verbose flag to CLI and MCP server for Chromium debug output
- Improve check_assignee to use top_assignees from search results with percentage info
- Update AGENTS.md with Rust binary docs, CLI commands, and testing sections
- Fix concept-interviewing functional-no-spec test: remove irrelevant search_patents check

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Rename target_patents → patents table
- Move abstract_text and legal_status from screened_patents to patents
- Redirect FKs (claims, elements, similarities, prior_art_elements) from
  screened_patents to patents — patent data is no longer coupled to
  screening decisions
- Add index_patents MCP tool: fetches abstract, legal_status, and claims
  from Google Patents for all unindexed patents server-side
- Remove abstract_text and legal_status from screen_patent tool/request
- Update screening SKILL.md to use index_patents instead of search_patents
- Fix screening/functional-with-data test: use import-csv instead of sqlite3
- Update all test TOMLs and initialize-database.sql for schema changes

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- get_unscreened now returns id + title + assignee + abstract per patent
  (default limit 10), or status messages ("N patents need indexing" /
  "All patents screened")
- get_unscreened skips unindexed patents and prompts to call index_patents
- index_patents runs in background thread (async), returns immediately
- Remove get_patent_detail step from screening flow — abstracts come via
  get_unscreened after indexing
- Update screening SKILL.md for simplified loop: get_unscreened →
  index_patents (if needed) → screen_patent → repeat

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move screening state detection (unindexed count) into core DB layer
via UnscreenedResult. Fix AtomicBool flag not being cleared after
indexing completes. Add stop_indexing MCP tool with AtomicBool swap.
Remove unnecessary get_progress verification step from screening skill.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add generic PageResult<T> with items + total_remaining fields.
Apply to get_unevaluated, get_unanalyzed, and get_unresearched so
each response includes total remaining count for progress tracking.
Update get_unscreened to include total_remaining alongside
unindexed_count. Simplify evaluating SKILL.md by removing search_patents
fetch and claims recording steps (now handled by index_patents).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move elements decomposition from evaluating into claim-analyzing so
the full flow (decompose elements → compare features → record
similarities) is in one skill. Update get_unevaluated query to check
for no elements instead of no claims (claims now populated by
index_patents). Deprecate evaluating SKILL.md (tests pending migration).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Delete evaluating SKILL.md and test directory. Update claim-analyzing
functional test to cover full flow (elements decomposition + similarity
analysis) starting from claims only (no pre-seeded elements).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…alyzed tool

- Remove get_unevaluated tool and UnevaluatedPatent type entirely
- Rewrite get_unanalyzed to return 1 patent at a time with needs field ("elements" | "similarities")
- Add decomposed filter to get_claims and claim_number/analyzed filters to get_elements
- Update CLI: remove GetUnevaluated command, add optional filter flags
- Fix claim-analyzing test fixtures: add matching features to avoid AskUserQuestion timeouts
- Update SKILL.md for single-patent processing flow

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…vestigation-reporting

- Add get_similarities MCP tool (DB method already existed)
- Add get_prior_art_elements MCP tool (new DB method + model)
- Rewrite investigation-reporting SKILL.md to use MCP tools directly
  instead of non-existent investigation-fetching skill
- Move templates to references/templates/, remove references/instructions
- Simplify patent-report template (remove search strategy section)
- Fix legal-checking invocation prefix (patent-kit:legal-checking)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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