Skip to content

feat!: rename MCP tools to match v2 docs (v3.0.0, BREAKING)#18

Merged
Vikrant-Khedkar merged 1 commit intoScrapeGraphAI:mainfrom
Vikrant-Khedkar:feat/v3-rename-tools-to-match-docs
Apr 30, 2026
Merged

feat!: rename MCP tools to match v2 docs (v3.0.0, BREAKING)#18
Vikrant-Khedkar merged 1 commit intoScrapeGraphAI:mainfrom
Vikrant-Khedkar:feat/v3-rename-tools-to-match-docs

Conversation

@Vikrant-Khedkar
Copy link
Copy Markdown
Collaborator

Summary

Aligns the MCP tool surface to the canonical v2 API vocabulary at docs.scrapegraphai.com/services/*. The MCP currently exposes legacy names (smartscraper, searchscraper, smartcrawler_initiate, …) while the docs and SDKs use extract, search, crawl_start, etc. This PR fixes that drift.

Hard rename, no aliases. Bumped to v3.0.0.

Renames

v2 (old) v3 (new) Endpoint
smartscraper extract POST /extract
searchscraper search POST /search
smartcrawler_initiate crawl_start POST /crawl
smartcrawler_fetch_results crawl_get_status GET /crawl/:id
sgai_history history GET /history
generate_schema schema POST /schema
markdownify removed use scrape with output_format="markdown"

Unchanged: scrape, crawl_stop, crawl_resume, credits, monitor_* (already match docs).

Tool count: 18 → 17.

What changed

  • src/scrapegraph_mcp/server.py — renamed 6 @mcp.tool functions, deleted markdownify tool. Also removed dead code on ScapeGraphClient: the markdownify() HTTP method and two backwards-compat shims (extract/search) that would have recursed infinitely after the rename.
  • pyproject.toml, server.json — version → 3.0.0.
  • README.md — added v2→v3 migration section, updated all tool tables and prose.
  • .agent/README.md, .agent/system/project_architecture.md, .agent/system/mcp_protocol.md — swept all references.
  • uv.lock — picked up the version bump.

Test plan

End-to-end verified locally via HTTP transport with X-API-Key:

  • tools/list returns exactly the 17 canonical names
  • credits returns live API data
  • extract (was smartscraper) on https://scrapegraphai.com returns structured JSON
  • search returns results
  • scrape returns markdown
  • history returns recent request log
  • Old names (smartscraper, markdownify) return Unknown tool: <name> (proves no silent fallback)
  • ruff check src/ passes
  • No stale old-name refs anywhere outside the README migration table

Out of scope (follow-ups)

  • Mintlify docs at docs.scrapegraphai.com/services/mcp-server/introduction live in a separate repo — needs a parallel docs PR before v3 ships publicly.
  • After merge: tag v3.0.0, publish to PyPI, Smithery picks up the new package on redeploy.

🤖 Generated with Claude Code

Aligns the MCP surface to the public v2 API vocabulary at
docs.scrapegraphai.com/services/*. Hard rename, no aliases — bumped to v3.0.0.

Renames:
- smartscraper          -> extract              (POST /extract)
- searchscraper         -> search               (POST /search)
- smartcrawler_initiate -> crawl_start          (POST /crawl)
- smartcrawler_fetch_results -> crawl_get_status (GET /crawl/:id)
- sgai_history          -> history              (GET /history)
- generate_schema       -> schema               (POST /schema)
- markdownify           -> removed (use scrape with output_format="markdown")

Tool count: 18 -> 17. ScapeGraphClient also lost its dead markdownify and
duplicate-name shim methods (extract/search) that would have recursed
infinitely after the rename.

End-to-end verified locally via HTTP transport with X-API-Key:
  - tools/list returns the 17 canonical names
  - extract / search / scrape / history / credits all return live API data
  - smartscraper / markdownify return "Unknown tool" as expected

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Vikrant-Khedkar Vikrant-Khedkar merged commit 49306b8 into ScrapeGraphAI:main Apr 30, 2026
2 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.

1 participant