- Home
- MCP servers
- GitHubTrending
GitHubTrending
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can access GitHub Trending data through an MCP server that exposes a REST API and an MCP endpoint so AI assistants can query real‑time trending repositories. This server caches data, scales globally, and supports modern function calling workflows with OpenAPI.
How to use
Connect an MCP client to the MCP endpoint to retrieve GitHub Trending data. You can filter results by programming language and by a time window such as daily, weekly, or monthly. Use the provided tool named get_trending_repos to request data about trending repositories. The results include rank, owner, repository name, URL, description, primary language, stars, forks, and stars gained in the selected period. The server indicates whether data came from a cache and confirms the language and period you requested.
How to install
Prerequisites: you need a working Node.js environment and access to run Cloudflare Pages Functions if you want to run or test locally. You also need npm or npx for package management.
# 1) Install dependencies
npm install
# 2) Start a local development server
npm run dev
# 3) Open the local site
# Access the local API and OpenAPI specs at the addresses shown by your dev server
Deployment options are provided for both automatic Git-based deployment and command-line deployment. Use the recommended automatic deployment by connecting your Git repository to Cloudflare Pages, or deploy manually from the command line.
# Command-line deployment (example)
npm install
npx wrangler pages deploy public --project-name=github-trending-service
Configuration and usage notes
The MCP endpoint for programmatic access is available at the following URL. Use this URL in MCP clients to establish a streaming or request/response connection as appropriate.
https://cloudflare-mcp1.zx1993.top/mcp/message
REST API and OpenAPI specifications are also exposed for direct HTTP usage and function calling integrations. The REST API for trending data is at the API path /api/trending, and the OpenAPI specification is at /api/openapi.json.
MCP tools and endpoints
The MCP tool available for querying trending data is named get_trending_repos. It retrieves GitHub Trending repositories and supports two optional parameters: language to filter by programming language (for example, python, javascript) and since to choose the time window (daily, weekly, or monthly). Use this tool in your MCP-enabled AI workflows to fetch up-to-date trending repositories.
Troubleshooting and tips
If you encounter empty results or errors, it may be a temporary GitHub rate limit or cache miss. Enabling or increasing KV cache usage can help reduce external requests and improve reliability. If MCP connection fails, verify that the endpoint URL uses HTTPS and that the path is /mcp/message. Check your CORS settings and ensure the server is reachable from your environment.
Notes on deployment and environment
The service is designed to deploy on Cloudflare Pages with Functions and KV caching. Automatic deployment is triggered by pushes to the main branch, with build steps including a build command and a specified output directory.
Available tools
get_trending_repos
Fetch GitHub Trending repositories with optional language and time-window filters for MCP-enabled AI clients.