Skip to content

Try out tanstack#180

Merged
InfinityBowman merged 4 commits into
mainfrom
try-out-tanstack
Dec 29, 2025
Merged

Try out tanstack#180
InfinityBowman merged 4 commits into
mainfrom
try-out-tanstack

Conversation

@InfinityBowman
Copy link
Copy Markdown
Owner

@InfinityBowman InfinityBowman commented Dec 29, 2025

Summary by CodeRabbit

  • New Features

    • Added TanStack Router, Start, and Query documentation tools for MCP server integration.
  • Improvements

    • Extended cache duration from 24 hours to 7 days for better performance.
  • Chores

    • Updated pnpm engine requirement to v10.26.0.
    • Updated MCP server configuration paths.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 29, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR introduces three new TanStack documentation tools (Router, Start, Query) to the MCP server, complete with a GitHub-based documentation scraper, local manifest caching, and TTL-based content caching. Configuration updates include workspace-relative MCP paths and pnpm version bumps.

Changes

Cohort / File(s) Summary
Configuration & Build
.cursor/mcp.json, package.json
Updated MCP server path to workspace-relative reference (${workspaceFolder}); bumped pnpm engine requirement and packageManager from 10.0.0 to 10.26.0
MCP Package Setup
packages/mcp/package.json
Added npm script scrape-tanstack-docs to invoke TanStack documentation scraper
Cache Configuration
packages/mcp/src/constants.ts
Extended CACHE_TTL from 24 hours to 7 days for persistent doc caching
Documentation Scraper
packages/mcp/src/scrape-tanstack-docs.ts
New script that crawls TanStack GitHub repositories (Router, Start, Query) to extract markdown paths, generate per-framework manifests, and persist as JSON files; includes rate-limit delay and error handling
Tool Registration
packages/mcp/src/server.ts
Registered three new TanStack documentation tools (router, start, query) via import and invocation of registration functions
TanStack Documentation Tools
packages/mcp/src/tools/tanstack-router.ts, packages/mcp/src/tools/tanstack-start.ts, packages/mcp/src/tools/tanstack-query.ts
Three new MCP tools that fetch and cache TanStack documentation from GitHub; each supports manifest-based path resolution, framework selection, dynamic index generation, and partial/exact path matching with user-friendly error messages
Documentation Manifests
packages/mcp/tanstack-router-manifest.json, packages/mcp/tanstack-start-manifest.json, packages/mcp/tanstack-query-manifest.json
Framework-to-documentation-paths mappings: Router (80 entries), Start, and Query; generated by scraper to drive documentation availability and path resolution

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Server as MCP Server
    participant Manifest as Manifest<br/>(JSON File)
    participant Cache as Memory Cache
    participant GitHub as GitHub API

    User->>Server: Request TanStack doc<br/>(path, framework)
    Server->>Manifest: Load manifest<br/>(if not cached)
    Manifest-->>Server: Framework→paths mapping
    Server->>Server: Resolve path<br/>in manifest
    Server->>Cache: Check for cached doc
    alt Cache Hit
        Cache-->>Server: Cached content<br/>(valid TTL)
    else Cache Miss
        Server->>GitHub: Fetch .md from GitHub
        GitHub-->>Server: Markdown content
        Server->>Cache: Store with 7-day TTL
    end
    Server-->>User: Formatted documentation
Loading

Estimated Code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • #155: Modifies packages/mcp/src/server.ts tool registration—this PR adds TanStack tools while the related PR removes Zag tool integration.
  • #144: Updates packages/mcp/src/constants.ts (CACHE_TTL) and MCP server configuration paths similarly.

Poem

🐰 Three tools hop into the warren,
TanStack docs we've brought to bear, friend!
Router, Start, Query—cached for seven days,
GitHub's wisdom in our grasp,
A rabbit's contribution: docs that last! 🚀

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch try-out-tanstack

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 69f1d59 and ee0f8c6.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (12)
  • .cursor/mcp.json
  • package.json
  • packages/mcp/package.json
  • packages/mcp/src/constants.ts
  • packages/mcp/src/scrape-tanstack-docs.ts
  • packages/mcp/src/server.ts
  • packages/mcp/src/tools/tanstack-query.ts
  • packages/mcp/src/tools/tanstack-router.ts
  • packages/mcp/src/tools/tanstack-start.ts
  • packages/mcp/tanstack-query-manifest.json
  • packages/mcp/tanstack-router-manifest.json
  • packages/mcp/tanstack-start-manifest.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Dec 29, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
corates ee0f8c6 Commit Preview URL

Branch Preview URL
Dec 29 2025, 02:18 AM

@InfinityBowman InfinityBowman merged commit b63c390 into main Dec 29, 2025
0 of 2 checks passed
@InfinityBowman InfinityBowman deleted the try-out-tanstack branch December 29, 2025 02:18
@coderabbitai coderabbitai Bot mentioned this pull request Apr 7, 2026
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