# GitHub MCP (`reverberant_equality/mcp-github`) Actor

Search GitHub repositories, discover trending projects, and fetch README files. AI agents can research open-source projects, inspect documentation, and find popular repositories by language or topic.

- **URL**: https://apify.com/reverberant\_equality/mcp-github.md
- **Developed by:** [Jordan C](https://apify.com/reverberant_equality) (community)
- **Categories:** AI
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## GitHub Repository Research MCP

Search public GitHub repositories, compare fast-growing projects, and retrieve repository README files directly from an MCP-compatible agent. This Apify Actor runs as a standby Streamable HTTP server and returns focused repository metadata instead of the full GitHub API response.

### What you can do

- Find open-source projects by keyword, topic, owner, language, or other GitHub repository-search qualifiers.
- Build shortlists using stars, forks, primary language, topics, and repository URLs.
- Discover recently created repositories ordered by stars, optionally filtered by language.
- Pull raw README Markdown into research, dependency-evaluation, or documentation workflows.

The Actor reads public GitHub data only. It does not create issues, modify repositories, inspect private repositories, clone code, or authenticate to GitHub on your behalf.

### Connect from an MCP client

Use the deployed **Streamable HTTP** endpoint:

```text
https://reverberant-equality--mcp-github.apify.actor/mcp
```

Authenticate the request at the Apify edge with your Apify API token:

```text
Authorization: Bearer $APIFY_TOKEN
```

Your client should also accept `application/json` and `text/event-stream`. MCP traffic is handled by `POST /mcp`; direct `GET` and `DELETE` requests to `/mcp` return HTTP 405.

### Registered tools

#### `search-github-repos`

| Argument | Required | Behavior |
| --- | --- | --- |
| `query` | Yes | String passed to GitHub repository search. GitHub search qualifiers are supported. |
| `maxResults` | No | Number; defaults to `20` and is clamped to `1`–`100`. |

Returns JSON with GitHub's `total_count` and a `repos` array. Each repository contains `full_name`, `description` (`string` or `null`), `stars`, `forks`, `language` (`string` or `null`), `url`, and `topics`.

#### `get-trending-repos`

| Argument | Required | Behavior |
| --- | --- | --- |
| `since` | No | `daily`, `weekly`, or `monthly`; defaults to `daily`. |
| `language` | No | Language string such as `typescript`, `python`, or `rust`. |

Returns `{ since, language, repos }`, using the same repository fields above. This is **not** GitHub's website Trending page. The implementation searches recently created repositories and sorts by stars, returning up to 25 results. `weekly` covers seven days; the current implementation treats both `daily` and `monthly` as 30-day creation windows.

#### `get-readme`

| Argument | Required | Behavior |
| --- | --- | --- |
| `repo` | Yes | Full public repository name in `owner/name` form. |

Returns the repository's raw README text as the MCP text content, without JSON wrapping or truncation.

### JSON example

Tool arguments:

```json
{
  "query": "language:rust topic:cli",
  "maxResults": 2
}
```

The MCP result contains one text item. Decoding that item's `text` produces this shape (values are illustrative):

```json
{
  "total_count": 42,
  "repos": [
    {
      "full_name": "example-org/example-cli",
      "description": "An example command-line project",
      "stars": 120,
      "forks": 14,
      "language": "Rust",
      "url": "https://github.com/example-org/example-cli",
      "topics": ["cli", "rust"]
    }
  ]
}
```

### Pricing

Each tool invocation charges one `tool-call` event at **$0.005 USD**. The handler charges before contacting GitHub, so an upstream failure after the handler starts can still consume the event. Invalid MCP arguments rejected before handler execution are not a completed tool invocation. Apify platform usage may be charged separately under your Apify plan.

### Upstream source, limits, and error behavior

Data comes from the public [GitHub REST API](https://docs.github.com/en/rest). This Actor does not send a GitHub token. GitHub therefore associates requests with the Actor's outbound IP and currently documents a primary limit of **60 unauthenticated REST requests per hour** plus a separate **10 unauthenticated search requests per minute** limit. Capacity can be shared across requests leaving the same runtime infrastructure. GitHub may also apply secondary abuse limits.

Repository search returns only the first requested page; there is no follow-up pagination. GitHub search can report incomplete results, but this server does not expose the upstream `incomplete_results` flag. GitHub also limits search query length and operator count. Private or inaccessible repositories are not returned.

Tool-level upstream failures return MCP content with `isError: true` and a readable GitHub or network message. A missing repository or missing README produces `Repository "owner/name" not found or has no README.` Invalid argument types or enum values are MCP schema errors. Unexpected transport failures return a JSON-RPC internal-server error.

### Privacy

Search terms and repository names are sent to GitHub and may appear in Actor logs. Responses are returned directly over MCP; this implementation does not write them to an Apify dataset or key-value store. Apify and GitHub still process request metadata according to their own policies. Do not put secrets, tokens, or confidential identifiers in queries.

### Run locally

Node.js 20 or newer is required.

```bash
npm install
npm run start:dev          # http://localhost:3000/mcp
npm test
npm run build
npm run start:prod
apify validate-schema
```

Set `APIFY_CONTAINER_PORT` to override port `3000` during local development.

# Actor input Schema

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("reverberant_equality/mcp-github").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("reverberant_equality/mcp-github").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call reverberant_equality/mcp-github --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,reverberant_equality/mcp-github"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/f3PFIPUB4niNhLwC3/builds/1ubE9FsWettPpCQ42/openapi.json
