github-mcp 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,193 @@
1
+ Metadata-Version: 2.4
2
+ Name: github-mcp
3
+ Version: 1.1.0
4
+ Summary: Local GitHub MCP server exposing GitHub REST API via FastMCP stdio transport
5
+ License: MIT License
6
+
7
+ Copyright (c) 2026 Lucas
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+ License-File: LICENSE
27
+ Keywords: github,mcp,fastmcp,stdio,rest api,search
28
+ Author: Lucas Waetzig
29
+ Author-email: development@waetzig.net
30
+ Requires-Python: >=3.12
31
+ Classifier: Development Status :: 5 - Production/Stable
32
+ Classifier: Intended Audience :: Developers
33
+ Classifier: Intended Audience :: Science/Research
34
+ Classifier: License :: OSI Approved :: MIT License
35
+ Classifier: Operating System :: OS Independent
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3.12
38
+ Classifier: Programming Language :: Python :: 3.13
39
+ Classifier: Topic :: Scientific/Engineering
40
+ Classifier: Topic :: Software Development :: Libraries
41
+ Requires-Dist: httpx (>=0.28.1,<0.29.0)
42
+ Requires-Dist: mcp[cli] (>=1.0.0)
43
+ Requires-Dist: pydantic (>=2.13.4,<3.0.0)
44
+ Project-URL: Documentation, https://personal-public-packages.gitlab.io/github-mcp
45
+ Project-URL: Homepage, https://github.com/LWaetzig/github-mcp
46
+ Project-URL: Issues, https://github.com/LWaetzig/github-mcp/issues
47
+ Project-URL: Repository, https://github.com/LWaetzig/github-mcp
48
+ Description-Content-Type: text/markdown
49
+
50
+ # github-mcp
51
+
52
+ An MCP (Model COntext Protocol) server that gives AI assistants direct access to GitHub. Exposing ~22 GitHub REST tools
53
+ covering repos, files, issues, pull requests, as well as searching.
54
+
55
+ ## Table of Contents
56
+
57
+ 1. [Features](#features)
58
+ 2. [Installation](#installation)
59
+ 3. [Usage]()
60
+ 4. [Contributing]()
61
+
62
+ ## Features
63
+
64
+ A single stdio MCP server (built on [FastMCP](https://github.com/modelcontextprotocol/python-sdk)) exposing **23 GitHub REST tools** grouped into four areas:
65
+
66
+ - **Repositories & files** — `github_list_repos`, `github_get_repo`, `github_list_branches`, `github_list_commits`, `github_get_file_contents`, `github_list_directory`, `github_create_or_update_file`, `github_create_branch`
67
+ - **Issues** — `github_list_issues`, `github_get_issue`, `github_create_issue`, `github_update_issue`, `github_add_issue_comment`
68
+ - **Pull requests** — `github_list_pull_requests`, `github_get_pull_request`, `github_create_pull_request`, `github_merge_pull_request`, `github_add_pr_comment`
69
+ - **Search** — `github_search_repositories`, `github_search_code`, `github_search_issues`, `github_search_users`, `github_search_commits`
70
+
71
+ Under the hood:
72
+
73
+ - **Async HTTP** via a shared, lazily-initialised `httpx.AsyncClient` against the pinned GitHub API version (`2022-11-28`).
74
+ - **Automatic pagination** — list endpoints follow the `Link: rel="next"` header up to a configurable item cap.
75
+ - **Typed inputs** — every tool validates its arguments with Pydantic models.
76
+ - **Actionable errors** — common GitHub failures (401, 403/rate-limit with reset time, 404, 409, 422, timeouts) are translated into clear, human-readable messages.
77
+ - **Flexible auth** — reads a fine-grained PAT from `GITHUB_TOKEN`, falling back to `GITHUB_PAT`.
78
+
79
+ ## Installation
80
+
81
+ ### Prerequisites
82
+
83
+ - `Python 3.12` or later
84
+ - Dependencies `mcp[cli]>=1.0.0`, `httpx>=0.27.0`, `pydantic>=2.0.0` (see [pyproject.toml](pyproject.toml)) (project uses `poetry` for dependency management)
85
+
86
+
87
+ ### Install from PyPi
88
+
89
+ ```bash
90
+ pip install github-mcp
91
+
92
+ # or using poetry
93
+ poetry add github-mcp
94
+ ```
95
+
96
+ ### Build from source
97
+
98
+ ```bash
99
+ git clone https://github.com/LWaetzig/github-mcp.git
100
+ cd github-mcp
101
+ pip install -e .
102
+ ```
103
+
104
+ ## Usage
105
+
106
+ - Detailed documentation about single tools can be found this [sphinx documentation]()
107
+
108
+ ### Prerequisites
109
+
110
+ #### Create a fine-grained Personal Access Token (PAT)
111
+
112
+ 1. Go to **GitHub -> Settings -> Developer settings -> Personal access tokens -> Fine-grained tokens** (direct link: <https://github.com/settings/tokens?type=beta>)
113
+ 2. Generate new token
114
+ 3. Set **Resource owner** and **Repository access** as appropriate
115
+ 4. Grant these **Repository permissions** (minimum for full read + write):
116
+
117
+ | Permission | Access level | Used by tools |
118
+ | ----------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
119
+ | **Metadata** | Read-only | All tools |
120
+ | **Contents** | Read and write | `github_get_file_contents`, `github_list_directory`, `github_list_commits`, `github_create_or_update_file`, `github_create_branch` |
121
+ | **Issues** | Read and write | `github_list_issues`, `github_get_issue`, `github_create_issue`, `github_update_issue`, `github_add_issue_comment` |
122
+ | **Pull requests** | Read and write | `github_list_pull_requests`, `github_get_pull_request`, `github_create_pull_request`, `github_merge_pull_request`, `github_add_pr_comment` |
123
+
124
+ > **Read-only subset**: grant only **Read-only** access to Contents, Issues, Pull requests, and Metadata if you don't need write tools.
125
+
126
+
127
+ ```bash
128
+ export GITHUB_TOKEN=github_pat_...
129
+ ```
130
+
131
+ Or copy `.env.example` -> `.env` and fill in the token (load with `source .env`).
132
+
133
+
134
+ ### Integrating with Claude Desktop
135
+
136
+ Add the server to your Claude Desktop configuration:
137
+
138
+ | Platform | Path |
139
+ |---|---|
140
+ | macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
141
+ | Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
142
+
143
+ Add the `github` entry under `mcpServers`, replacing the path with the absolute path to your clone:
144
+
145
+ ```json
146
+ {
147
+ "mcpServers" : {
148
+ "github" : {
149
+ "command" : "python",
150
+ "args" : ["-m", "github-mcp"],
151
+ "env" : {
152
+ "GITHUB_TOKEN" : "github_pat_..."
153
+ }
154
+ }
155
+ }
156
+ }
157
+ ```
158
+
159
+ Restart Claude Desktop. You should see the github tools available int he tool picker.
160
+
161
+ ### Integration with Other MCP Clients
162
+
163
+ Any MCP client (e.g. Cline, GitHub Copilot, or custm tools) can use this server.
164
+ Configuration depends on your assistant, in most cases there is a `config` to change.
165
+
166
+
167
+ ## Contribution
168
+
169
+ Contributions are welcome! Please:
170
+
171
+ 1. Fork the repository
172
+ 2. Create a feature branch (`git checkout -b feature/your-feature`)
173
+ 3. Commit your changes with clear messages
174
+ 4. Push to your fork
175
+ 5. Open a pull request
176
+
177
+
178
+ ### Live testing with MCP Inspector (requires a real token)
179
+
180
+ ```bash
181
+ GITHUB_TOKEN=...
182
+ npx @modelcontextprotocol/inspector
183
+ uv run github-mcp
184
+ ```
185
+
186
+ Then call `github_search_repositories` (q=`"mcp language:python"`) or `github_get_repo` (owner=`"modelcontextprotocol"`, repo=`"python-sdk"`) to verify auth,
187
+ pagination, and formatting end-to-end.
188
+
189
+
190
+ ## Upcoming Features
191
+
192
+ - **Projects v2**: Requires GitHub's GraphQL API (`/graphql`). Add a `graphql_client.py` alongside `client.py` and a new `tools/projects.py` module.
193
+ - **Actions**: Also REST-based but with many endpoints. Add `tools/actions.py` importing from `client.py`.
@@ -0,0 +1,15 @@
1
+ github_mcp/__init__.py,sha256=-cx-hrMID_2q5ixVhAayshit9UnVB3wjJALSpI6hKs8,104
2
+ github_mcp/app.py,sha256=GBqVSTPpz43GYQ59r-T8biCz4Brm5s9wdxD_Kcn_eMA,68
3
+ github_mcp/client.py,sha256=LMBNjydU2Y7vStjFYirIE-WhkSpcJB-WclLunAJ0xNc,8763
4
+ github_mcp/formatting.py,sha256=oQXiNovgbrw7YbFgwTu_rT8-beSRAFHpn9TOmuKyb2c,3917
5
+ github_mcp/server.py,sha256=vxOhwJDuES8iGto2K9wtRnAu-r2XZfhuiu6E331vhQA,453
6
+ github_mcp/tools/__init__.py,sha256=1Oeoii5RzMLNd7cLq4Z6ydgk-yQ9SJqpTejYvbs3tOU,89
7
+ github_mcp/tools/issues.py,sha256=CzrJEEmZ-xUsYzqXWvp6-B1-2tYbNcy6T2_0V_7-z5E,14447
8
+ github_mcp/tools/pulls.py,sha256=AG9udxovrmnUjSdKEyzgW5qjTD5aPquHYyFyQS5OhRs,15567
9
+ github_mcp/tools/repos.py,sha256=m7qWWmtBWrLm3jn5iSbnmsa768cEyw5-covAIlXaDzo,23991
10
+ github_mcp/tools/search.py,sha256=6VyvRG7wIPrjimIjkuc6vJBtAVF7qiK7clmfZiSWNvI,17932
11
+ github_mcp-1.1.0.dist-info/METADATA,sha256=UY13nfkjt9cxXQIivwGff4mur4OhOx9ACcU1kzZJOf0,8233
12
+ github_mcp-1.1.0.dist-info/WHEEL,sha256=kJCRJT_g0adfAJzTx2GUMmS80rTJIVHRCfG0DQgLq3o,88
13
+ github_mcp-1.1.0.dist-info/entry_points.txt,sha256=hgmRd9ToUUhH7k07RC2X4yuG1H9MOBhM_jUUAAgWkuc,59
14
+ github_mcp-1.1.0.dist-info/licenses/LICENSE,sha256=KQfV6Cz2Um8tbLZEQPiOXbJF76RE5fJC_soO1-otIKI,1062
15
+ github_mcp-1.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.3.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ github-query-mcp=github_mcp.server:main
3
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lucas
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.