Feat/list repositories filtering#1
Open
dennisonbertram wants to merge 2 commits intoericzakariasson:mainfrom
Open
Feat/list repositories filtering#1dennisonbertram wants to merge 2 commits intoericzakariasson:mainfrom
dennisonbertram wants to merge 2 commits intoericzakariasson:mainfrom
Conversation
- Removed bun-types dependency that was causing build errors - Allows project to compile with standard Node.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Problem: - Cursor API /v0/repositories endpoint returns 28,000+ tokens (exceeds MCP 25K limit) - No server-side pagination support in Cursor API - Strict rate limits (1/min, 30/hour) make repeated calls impractical Solution: - Implemented 5-minute TTL cache for repository data - Added client-side filtering by search term and owner - Added pagination support with limit/offset parameters - Enhanced tool description with usage examples Changes: - src/api-client.ts: Added RepositoryCache class with TTL caching - src/schemas.ts: Added ListRepositoriesSchema with filter parameters - src/server.ts: Updated list_repositories tool with filtering logic Benefits: - Responses now under 5,000 tokens (well within MCP limits) - Fast responses via caching (avoids rate limit issues) - Flexible filtering for users - Backward compatible (optional parameters) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Owner
|
Nice, thank you! Are you able to make a more generic implementation of the cache? |
Author
|
Sure, in what way would you want it to be generic? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add client-side filtering for the repositories which currently send too much data.