github / github/github-mcp-server

Add optional "jq" field to every MCP tool

Offen
#1,306 6 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Go
Sterne
33k
Forks
5k
Ø Merge
2 T. 1 Std.
Gemergte PRs (30 T.)
52

Beschreibung

### Describe the feature or problem you’d like to solve

The GitHub MCP has a systematic problem that its delivered results are too "fat", containing too many tokens.

This is chronic and affects almost every single MCP tool. Some particular problems are
* Getting actions logs results in vast logs being delivered to model
* Getting all the comments on a long issue or discussion results in too much being delivered to model
* Getting the details of a issue or discussion allows no selective choice of data to deliver to model

### Proposed solution

This is a chronic problem with the MCP architecture. The best solution for the GitHub MCP in particular is to
1. document the schema return type for each tool
2. add an optional jq input parameter to every tool call

Then implement the `jq` filtering/transformation/query over the result. This allows models to dramatically reduce the information selected using the full power of JQuery

### Example prompts or workflows (for tools/toolsets only)

```
Search the actions logs for run 1002032 for ERROR lines
```

```
Download the last 10 lines of the actions logs for run 1002032
```

```
Look if Discussion 11 is closed or open and get its labels. Do not get its body.
```

### Additional context

This could also be done as an MCP->MCP transform. But for GitHub's very widely used MCP I think it's worth doing in-MCP.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.