github-agent 0.11.1__tar.gz → 0.19.0__tar.gz

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.
Files changed (65) hide show
  1. github_agent-0.19.0/PKG-INFO +336 -0
  2. github_agent-0.19.0/README.md +315 -0
  3. {github_agent-0.11.1 → github_agent-0.19.0}/github_agent/agent_server.py +1 -1
  4. github_agent-0.19.0/github_agent/api/__init__.py +1 -0
  5. github_agent-0.19.0/github_agent/api/api_client_base.py +147 -0
  6. github_agent-0.19.0/github_agent/api/api_client_branches.py +114 -0
  7. github_agent-0.19.0/github_agent/api/api_client_commits.py +46 -0
  8. github_agent-0.19.0/github_agent/api/api_client_contents.py +112 -0
  9. github_agent-0.19.0/github_agent/api/api_client_issues.py +84 -0
  10. github_agent-0.19.0/github_agent/api/api_client_orgs.py +40 -0
  11. github_agent-0.19.0/github_agent/api/api_client_pulls.py +88 -0
  12. github_agent-0.19.0/github_agent/api/api_client_releases.py +115 -0
  13. github_agent-0.19.0/github_agent/api/api_client_repos.py +200 -0
  14. github_agent-0.19.0/github_agent/api/api_client_search.py +62 -0
  15. github_agent-0.19.0/github_agent/api/api_client_workflows.py +134 -0
  16. github_agent-0.19.0/github_agent/api_client.py +41 -0
  17. {github_agent-0.11.1 → github_agent-0.19.0}/github_agent/auth.py +29 -13
  18. {github_agent-0.11.1 → github_agent-0.19.0}/github_agent/github_input_models.py +123 -25
  19. {github_agent-0.11.1 → github_agent-0.19.0}/github_agent/github_response_models.py +57 -0
  20. github_agent-0.19.0/github_agent/mcp/__init__.py +31 -0
  21. github_agent-0.19.0/github_agent/mcp/mcp_action.py +165 -0
  22. github_agent-0.19.0/github_agent/mcp/mcp_branch.py +105 -0
  23. github_agent-0.19.0/github_agent/mcp/mcp_collaborator.py +91 -0
  24. github_agent-0.19.0/github_agent/mcp/mcp_commit.py +70 -0
  25. github_agent-0.19.0/github_agent/mcp/mcp_content.py +142 -0
  26. github_agent-0.19.0/github_agent/mcp/mcp_issue.py +106 -0
  27. github_agent-0.19.0/github_agent/mcp/mcp_org.py +75 -0
  28. github_agent-0.19.0/github_agent/mcp/mcp_pull.py +110 -0
  29. github_agent-0.19.0/github_agent/mcp/mcp_release.py +134 -0
  30. github_agent-0.19.0/github_agent/mcp/mcp_repo.py +113 -0
  31. github_agent-0.19.0/github_agent/mcp/mcp_search.py +68 -0
  32. {github_agent-0.11.1 → github_agent-0.19.0}/github_agent/mcp_server.py +562 -1
  33. github_agent-0.19.0/github_agent.egg-info/PKG-INFO +336 -0
  34. github_agent-0.19.0/github_agent.egg-info/SOURCES.txt +55 -0
  35. github_agent-0.19.0/github_agent.egg-info/requires.txt +6 -0
  36. {github_agent-0.11.1 → github_agent-0.19.0}/pyproject.toml +4 -3
  37. github_agent-0.19.0/tests/conftest.py +11 -0
  38. github_agent-0.19.0/tests/test_api_client_endpoints.py +162 -0
  39. github_agent-0.19.0/tests/test_api_validation.py +80 -0
  40. github_agent-0.19.0/tests/test_auth_client_edge_cases.py +198 -0
  41. github_agent-0.19.0/tests/test_github_agent_api_brute_force_coverage.py +193 -0
  42. github_agent-0.19.0/tests/test_init_dynamics.py +51 -0
  43. github_agent-0.19.0/tests/test_mcp_coverage.py +1036 -0
  44. github_agent-0.19.0/tests/test_model_fields.py +109 -0
  45. github_agent-0.19.0/tests/test_startup.py +38 -0
  46. github_agent-0.11.1/PKG-INFO +0 -292
  47. github_agent-0.11.1/README.md +0 -272
  48. github_agent-0.11.1/github_agent/api_client.py +0 -546
  49. github_agent-0.11.1/github_agent.egg-info/PKG-INFO +0 -292
  50. github_agent-0.11.1/github_agent.egg-info/SOURCES.txt +0 -24
  51. github_agent-0.11.1/github_agent.egg-info/requires.txt +0 -5
  52. github_agent-0.11.1/tests/test_github_agent_api_brute_force_coverage.py +0 -107
  53. github_agent-0.11.1/tests/test_startup.py +0 -12
  54. {github_agent-0.11.1 → github_agent-0.19.0}/LICENSE +0 -0
  55. {github_agent-0.11.1 → github_agent-0.19.0}/github_agent/__init__.py +0 -0
  56. {github_agent-0.11.1 → github_agent-0.19.0}/github_agent/__main__.py +0 -0
  57. {github_agent-0.11.1 → github_agent-0.19.0}/github_agent/mcp_config.json +0 -0
  58. {github_agent-0.11.1 → github_agent-0.19.0}/github_agent.egg-info/dependency_links.txt +0 -0
  59. {github_agent-0.11.1 → github_agent-0.19.0}/github_agent.egg-info/entry_points.txt +0 -0
  60. {github_agent-0.11.1 → github_agent-0.19.0}/github_agent.egg-info/top_level.txt +0 -0
  61. {github_agent-0.11.1 → github_agent-0.19.0}/scripts/validate_a2a_agent.py +0 -0
  62. {github_agent-0.11.1 → github_agent-0.19.0}/scripts/verify_api_integration.py +0 -0
  63. {github_agent-0.11.1 → github_agent-0.19.0}/setup.cfg +0 -0
  64. {github_agent-0.11.1 → github_agent-0.19.0}/tests/test_concept_parity.py +0 -0
  65. {github_agent-0.11.1 → github_agent-0.19.0}/tests/test_github_agent_brute_force_coverage.py +0 -0
@@ -0,0 +1,336 @@
1
+ Metadata-Version: 2.4
2
+ Name: github-agent
3
+ Version: 0.19.0
4
+ Summary: GitHub Agent for MCP
5
+ Author-email: Audel Rouhi <knucklessg1@gmail.com>
6
+ License: MIT
7
+ Classifier: Development Status :: 5 - Production/Stable
8
+ Classifier: License :: Public Domain
9
+ Classifier: Environment :: Console
10
+ Classifier: Operating System :: POSIX :: Linux
11
+ Classifier: Programming Language :: Python :: 3
12
+ Requires-Python: <3.14,>=3.11
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: agent-utilities[agent,logfire]>=0.26.0
16
+ Provides-Extra: test
17
+ Requires-Dist: pytest-xdist>=3.6.0; extra == "test"
18
+ Requires-Dist: pytest; extra == "test"
19
+ Requires-Dist: pytest-asyncio; extra == "test"
20
+ Dynamic: license-file
21
+
22
+ # Github Agent
23
+ ## CLI or API | MCP | Agent
24
+
25
+ ![PyPI - Version](https://img.shields.io/pypi/v/github-agent)
26
+ ![MCP Server](https://badge.mcpx.dev?type=server 'MCP Server')
27
+ ![PyPI - Downloads](https://img.shields.io/pypi/dd/github-agent)
28
+ ![GitHub Repo stars](https://img.shields.io/github/stars/Knuckles-Team/github-agent)
29
+ ![GitHub forks](https://img.shields.io/github/forks/Knuckles-Team/github-agent)
30
+ ![GitHub contributors](https://img.shields.io/github/contributors/Knuckles-Team/github-agent)
31
+ ![PyPI - License](https://img.shields.io/pypi/l/github-agent)
32
+ ![GitHub](https://img.shields.io/github/license/Knuckles-Team/github-agent)
33
+ ![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/Knuckles-Team/github-agent)
34
+ ![GitHub pull requests](https://img.shields.io/github/issues-pr/Knuckles-Team/github-agent)
35
+ ![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/Knuckles-Team/github-agent)
36
+ ![GitHub issues](https://img.shields.io/github/issues/Knuckles-Team/github-agent)
37
+ ![GitHub top language](https://img.shields.io/github/languages/top/Knuckles-Team/github-agent)
38
+ ![GitHub language count](https://img.shields.io/github/languages/count/Knuckles-Team/github-agent)
39
+ ![GitHub repo size](https://img.shields.io/github/repo-size/Knuckles-Team/github-agent)
40
+ ![GitHub repo file count (file type)](https://img.shields.io/github/directory-file-count/Knuckles-Team/github-agent)
41
+ ![PyPI - Wheel](https://img.shields.io/pypi/wheel/github-agent)
42
+ ![PyPI - Implementation](https://img.shields.io/pypi/implementation/github-agent)
43
+
44
+ *Version: 0.19.0*
45
+
46
+ ---
47
+
48
+ ## Overview
49
+
50
+ **Github Agent** is a production-grade Agent and Model Context Protocol (MCP) server designed to interface directly with GitHub Agent for MCP.
51
+
52
+ ---
53
+
54
+ ## Key Features
55
+
56
+ - **Consolidated Action-Routed MCP Tools:** Minimizes token overhead and eliminates tool bloat in LLM contexts by grouping methods into optimized, togglable tool modules.
57
+ - **Enterprise-Grade Security:** Comprehensive support for Eunomia policies, OIDC token delegation, and granular execution context tracking.
58
+ - **Integrated Graph Agent:** Built-in Pydantic AI agent supporting the Agent Control Protocol (ACP) and standard Web interfaces (AG-UI).
59
+ - **Native Telemetry & Tracing:** Out-of-the-box OpenTelemetry exports and native Langfuse tracing.
60
+
61
+ ---
62
+
63
+ ## CLI or API
64
+
65
+ This agent wraps the GitHub Agent for MCP API. You can interact with it programmatically or via its integrated execution entrypoints.
66
+
67
+ Detailed instructions on how to use the underlying API wrappers, extended schema bindings, and developer SDK references are maintained in [docs/index.md](docs/index.md).
68
+
69
+ ---
70
+
71
+ ## MCP
72
+
73
+ This server utilizes dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.
74
+
75
+ ### Available MCP Tools
76
+ | Tool Module | Toggle Env Var | Enabled by Default | Description & Nested Methods |
77
+ |-------------|----------------|--------------------|------------------------------|
78
+ | **Repo** | `REPO_TOOL` | `True` | Manage GitHub repositories. Action-routed methods: `create`, `delete`, `get`, `list`, `update`. |
79
+ | **Issue** | `ISSUE_TOOL` | `True` | Manage GitHub issues. Action-routed methods: `create`, `get`, `list`, `update`. |
80
+ | **Pull** | `PULL_TOOL` | `True` | Manage GitHub pull requests. Action-routed methods: `create`, `get`, `list`, `update`. |
81
+ | **Content** | `CONTENT_TOOL` | `True` | Manage GitHub contents. Action-routed methods: `create`, `delete`, `get`, `update`. |
82
+ | **Branch** | `BRANCH_TOOL` | `True` | Manage GitHub branches. Action-routed methods: `create`, `delete`, `get`, `list`. |
83
+ | **Commit** | `COMMIT_TOOL` | `True` | Manage GitHub commits. Action-routed methods: `get`, `list`. |
84
+ | **Search** | `SEARCH_TOOL` | `True` | Search GitHub repositories, issues, or code. Action-routed methods: `code`, `issues`, `repositories`. |
85
+ | **Org** | `ORG_TOOL` | `True` | Manage GitHub organizations. Action-routed methods: `members`, `repos`, `teams`. |
86
+ | **Collaborator** | `COLLABORATOR_TOOL` | `True` | Manage repository collaborators. Action-routed methods: `add`, `list`, `remove`. |
87
+ | **Action** | `ACTION_TOOL` | `True` | Manage GitHub actions workflows and runs. Action-routed methods: `cancel`, `delete_run`, `get_run`, `list_runs`, `list_workflows`, `rerun`, `trigger_dispatch`. |
88
+ | **Release** | `RELEASE_TOOL` | `True` | Manage repository releases. Action-routed methods: `create`, `delete`, `get`, `list`, `update`. |
89
+
90
+ Detailed tool schemas, parameter shapes, and validation constraints are preserved in [docs/mcp.md](docs/mcp.md).
91
+
92
+ ### Dynamic Tool Selection & Visibility
93
+
94
+ This MCP server supports dynamic toolset selection and visibility filtering at runtime. This allows you to restrict the set of exposed tools in order to prevent blowing up the LLM's context window.
95
+
96
+ You can configure tool filtering via multiple input channels:
97
+
98
+ - **CLI Arguments:** Pass `--tools` or `--toolsets` (or their disabled counterparts `--disabled-tools` and `--disabled-toolsets`) during startup.
99
+ - **Environment Variables:** Define standard environment variables:
100
+ - `MCP_ENABLED_TOOLS` / `MCP_DISABLED_TOOLS`
101
+ - `MCP_ENABLED_TAGS` / `MCP_DISABLED_TAGS`
102
+ - **HTTP SSE Request Headers:** Pass custom headers during transport initialization:
103
+ - `x-mcp-enabled-tools` / `x-mcp-disabled-tools`
104
+ - `x-mcp-enabled-tags` / `x-mcp-disabled-tags`
105
+ - **HTTP SSE Request Query Parameters:** Append query parameters directly to your transport connection URL:
106
+ - `?tools=tool1,tool2`
107
+ - `?tags=tag1`
108
+
109
+ When query strings or parameters are supplied, an LLM-free **Knowledge Graph resolution layer** (using `DynamicToolOrchestrator`) matches query intents against known tool tags, names, or descriptions, with safe fallback and automated 24-hour background cache refreshing.
110
+
111
+ ---
112
+
113
+ ### MCP Configuration Examples
114
+
115
+ #### stdio Transport (Recommended for local IDEs e.g., Cursor, Claude Desktop)
116
+ Configure your IDE's `mcp.json` to launch the MCP server via `uvx`:
117
+
118
+ ```json
119
+ {
120
+ "mcpServers": {
121
+ "github-agent": {
122
+ "command": "uvx",
123
+ "args": [
124
+ "--from",
125
+ "github-agent",
126
+ "github-mcp"
127
+ ],
128
+ "env": {
129
+ "GITHUB_URL": "your_github_url_here",
130
+ "GITHUB_VERIFY": "your_github_verify_here",
131
+ "DEBUG": "your_debug_here",
132
+ "PYTHONUNBUFFERED": "your_pythonunbuffered_here",
133
+ "GITHUB_TOKEN": "your_github_token_here"
134
+ }
135
+ }
136
+ }
137
+ }
138
+ ```
139
+
140
+ #### Streamable-HTTP Transport (Recommended for production deployments)
141
+ Configure your client's `mcp.json` to launch the Streamable-HTTP server via `uvx` with explicit host and port definition:
142
+
143
+ ```json
144
+ {
145
+ "mcpServers": {
146
+ "github-agent": {
147
+ "command": "uvx",
148
+ "args": [
149
+ "--from",
150
+ "github-agent",
151
+ "github-mcp"
152
+ ],
153
+ "env": {
154
+ "TRANSPORT": "streamable-http",
155
+ "HOST": "0.0.0.0",
156
+ "PORT": "8000",
157
+ "GITHUB_URL": "your_github_url_here",
158
+ "GITHUB_VERIFY": "your_github_verify_here",
159
+ "DEBUG": "your_debug_here",
160
+ "PYTHONUNBUFFERED": "your_pythonunbuffered_here",
161
+ "GITHUB_TOKEN": "your_github_token_here"
162
+ }
163
+ }
164
+ }
165
+ }
166
+ ```
167
+
168
+ Alternatively, connect to a pre-deployed remote or local Streamable-HTTP instance:
169
+
170
+ ```json
171
+ {
172
+ "mcpServers": {
173
+ "github-agent": {
174
+ "url": "http://localhost:8000/github-agent/mcp"
175
+ }
176
+ }
177
+ }
178
+ ```
179
+
180
+ Deploying the Streamable-HTTP server via Docker:
181
+
182
+ ```bash
183
+ docker run -d \
184
+ --name github-agent-mcp \
185
+ -p 8000:8000 \
186
+ -e TRANSPORT=streamable-http \
187
+ -e PORT=8000 \
188
+ -e GITHUB_URL="your_value" \
189
+ -e GITHUB_VERIFY="your_value" \
190
+ -e DEBUG="your_value" \
191
+ -e PYTHONUNBUFFERED="your_value" \
192
+ -e GITHUB_TOKEN="your_value" \
193
+ knucklessg1/github-agent:latest
194
+ ```
195
+
196
+ ---
197
+
198
+ ## Agent
199
+
200
+ This repository features a fully integrated Pydantic AI Graph Agent. It communicates over the **Agent Control Protocol (ACP)** and interacts seamlessly with the **Agent Web UI (AG-UI)** and Terminal interface.
201
+
202
+ ### Running the Agent CLI
203
+ To start the interactive command-line agent:
204
+
205
+ ```bash
206
+ # Set credentials
207
+ export GITHUB_URL="your_value"
208
+ export GITHUB_VERIFY="your_value"
209
+ export DEBUG="your_value"
210
+ export PYTHONUNBUFFERED="your_value"
211
+ export GITHUB_TOKEN="your_value"
212
+
213
+ # Run the agent server
214
+ github-agent --provider openai --model-id gpt-4o
215
+ ```
216
+
217
+ ### Docker Compose Orchestration
218
+ The following `docker/agent.compose.yml` configures the Agent, Web UI, and Terminal Interface together:
219
+
220
+ ```yaml
221
+ version: '3.8'
222
+
223
+ services:
224
+ github-agent-mcp:
225
+ image: knucklessg1/github-agent:latest
226
+ container_name: github-agent-mcp
227
+ hostname: github-agent-mcp
228
+ restart: always
229
+ env_file:
230
+ - ../.env
231
+ environment:
232
+ - PYTHONUNBUFFERED=1
233
+ - HOST=0.0.0.0
234
+ - PORT=8000
235
+ - TRANSPORT=streamable-http
236
+ ports:
237
+ - "8000:8000"
238
+ healthcheck:
239
+ test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
240
+ interval: 30s
241
+ timeout: 10s
242
+ retries: 3
243
+ start_period: 10s
244
+ logging:
245
+ driver: json-file
246
+ options:
247
+ max-size: "10m"
248
+ max-file: "3"
249
+
250
+ github-agent-agent:
251
+ image: knucklessg1/github-agent:latest
252
+ container_name: github-agent-agent
253
+ hostname: github-agent-agent
254
+ restart: always
255
+ depends_on:
256
+ - github-agent-mcp
257
+ env_file:
258
+ - ../.env
259
+ command: [ "github-agent" ]
260
+ environment:
261
+ - PYTHONUNBUFFERED=1
262
+ - HOST=0.0.0.0
263
+ - PORT=9016
264
+ - MCP_URL=http://github-agent-mcp:8000/mcp
265
+ - PROVIDER=${PROVIDER:-openai}
266
+ - MODEL_ID=${MODEL_ID:-gpt-4o}
267
+ - ENABLE_WEB_UI=True
268
+ - ENABLE_OTEL=True
269
+ ports:
270
+ - "9016:9016"
271
+ healthcheck:
272
+ test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:9016/health')"]
273
+ interval: 30s
274
+ timeout: 10s
275
+ retries: 3
276
+ start_period: 10s
277
+ logging:
278
+ driver: json-file
279
+ options:
280
+ max-size: "10m"
281
+ max-file: "3"
282
+
283
+ ```
284
+
285
+ Detailed graph node architecture explanations, custom skill configurations, and agentic trace guides are available in [docs/agent.md](docs/agent.md).
286
+
287
+ ---
288
+
289
+ ## Security & Governance
290
+
291
+ Built directly upon the enterprise-ready [`agent-utilities`](https://github.com/Knuckles-Team/agent-utilities) core, standard security parameters are fully supported:
292
+
293
+ ### Access Control & Policy Enforcement
294
+ - **Eunomia Policies:** Fine-grained, policy-driven tool authorization. Supports `none`, local `embedded` (`mcp_policies.json`), or centralized `remote` modes.
295
+ - **OIDC Token Delegation:** Compliant with RFC 8693 token exchange for flowing authenticating user credentials from Web UI / ACP → Agent → MCP.
296
+ - **Scoped Credentials:** Execution context runs restricted to the specific caller identity.
297
+
298
+ ### Runtime Security Grid
299
+ | Feature | Functionality | Enablement |
300
+ |---------|---------------|------------|
301
+ | **Tool Guard** | Sensitivity inspection with human-in-the-loop validation | Enabled by default |
302
+ | **Prompt Injection Defense** | Input scanning, repetition monitoring, and recursive loop blocks | Enabled by default |
303
+ | **Context Safety Guard** | Stuck-loop detectors and contextual overflow preemptive alerts | Enabled by default |
304
+
305
+ ---
306
+
307
+ ## Installation
308
+
309
+ Install the Python package locally:
310
+
311
+ ```bash
312
+ # Using uv (highly recommended)
313
+ uv pip install github-agent[all]
314
+
315
+ # Using standard pip
316
+ python -m pip install github-agent[all]
317
+ ```
318
+
319
+ ---
320
+
321
+ ## Repository Owners
322
+
323
+ <img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=Knucklessg1&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />
324
+
325
+ ![GitHub followers](https://img.shields.io/github/followers/Knucklessg1)
326
+ ![GitHub User's stars](https://img.shields.io/github/stars/Knucklessg1)
327
+
328
+ ---
329
+
330
+ ## Contribute
331
+
332
+ Contributions are welcome! Please ensure code quality by executing local checks before submitting pull requests:
333
+ - Format code using `ruff format .`
334
+ - Lint code using `ruff check .`
335
+ - Validate type-safety with `mypy .`
336
+ - Execute test suites using `pytest`
@@ -0,0 +1,315 @@
1
+ # Github Agent
2
+ ## CLI or API | MCP | Agent
3
+
4
+ ![PyPI - Version](https://img.shields.io/pypi/v/github-agent)
5
+ ![MCP Server](https://badge.mcpx.dev?type=server 'MCP Server')
6
+ ![PyPI - Downloads](https://img.shields.io/pypi/dd/github-agent)
7
+ ![GitHub Repo stars](https://img.shields.io/github/stars/Knuckles-Team/github-agent)
8
+ ![GitHub forks](https://img.shields.io/github/forks/Knuckles-Team/github-agent)
9
+ ![GitHub contributors](https://img.shields.io/github/contributors/Knuckles-Team/github-agent)
10
+ ![PyPI - License](https://img.shields.io/pypi/l/github-agent)
11
+ ![GitHub](https://img.shields.io/github/license/Knuckles-Team/github-agent)
12
+ ![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/Knuckles-Team/github-agent)
13
+ ![GitHub pull requests](https://img.shields.io/github/issues-pr/Knuckles-Team/github-agent)
14
+ ![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/Knuckles-Team/github-agent)
15
+ ![GitHub issues](https://img.shields.io/github/issues/Knuckles-Team/github-agent)
16
+ ![GitHub top language](https://img.shields.io/github/languages/top/Knuckles-Team/github-agent)
17
+ ![GitHub language count](https://img.shields.io/github/languages/count/Knuckles-Team/github-agent)
18
+ ![GitHub repo size](https://img.shields.io/github/repo-size/Knuckles-Team/github-agent)
19
+ ![GitHub repo file count (file type)](https://img.shields.io/github/directory-file-count/Knuckles-Team/github-agent)
20
+ ![PyPI - Wheel](https://img.shields.io/pypi/wheel/github-agent)
21
+ ![PyPI - Implementation](https://img.shields.io/pypi/implementation/github-agent)
22
+
23
+ *Version: 0.19.0*
24
+
25
+ ---
26
+
27
+ ## Overview
28
+
29
+ **Github Agent** is a production-grade Agent and Model Context Protocol (MCP) server designed to interface directly with GitHub Agent for MCP.
30
+
31
+ ---
32
+
33
+ ## Key Features
34
+
35
+ - **Consolidated Action-Routed MCP Tools:** Minimizes token overhead and eliminates tool bloat in LLM contexts by grouping methods into optimized, togglable tool modules.
36
+ - **Enterprise-Grade Security:** Comprehensive support for Eunomia policies, OIDC token delegation, and granular execution context tracking.
37
+ - **Integrated Graph Agent:** Built-in Pydantic AI agent supporting the Agent Control Protocol (ACP) and standard Web interfaces (AG-UI).
38
+ - **Native Telemetry & Tracing:** Out-of-the-box OpenTelemetry exports and native Langfuse tracing.
39
+
40
+ ---
41
+
42
+ ## CLI or API
43
+
44
+ This agent wraps the GitHub Agent for MCP API. You can interact with it programmatically or via its integrated execution entrypoints.
45
+
46
+ Detailed instructions on how to use the underlying API wrappers, extended schema bindings, and developer SDK references are maintained in [docs/index.md](docs/index.md).
47
+
48
+ ---
49
+
50
+ ## MCP
51
+
52
+ This server utilizes dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.
53
+
54
+ ### Available MCP Tools
55
+ | Tool Module | Toggle Env Var | Enabled by Default | Description & Nested Methods |
56
+ |-------------|----------------|--------------------|------------------------------|
57
+ | **Repo** | `REPO_TOOL` | `True` | Manage GitHub repositories. Action-routed methods: `create`, `delete`, `get`, `list`, `update`. |
58
+ | **Issue** | `ISSUE_TOOL` | `True` | Manage GitHub issues. Action-routed methods: `create`, `get`, `list`, `update`. |
59
+ | **Pull** | `PULL_TOOL` | `True` | Manage GitHub pull requests. Action-routed methods: `create`, `get`, `list`, `update`. |
60
+ | **Content** | `CONTENT_TOOL` | `True` | Manage GitHub contents. Action-routed methods: `create`, `delete`, `get`, `update`. |
61
+ | **Branch** | `BRANCH_TOOL` | `True` | Manage GitHub branches. Action-routed methods: `create`, `delete`, `get`, `list`. |
62
+ | **Commit** | `COMMIT_TOOL` | `True` | Manage GitHub commits. Action-routed methods: `get`, `list`. |
63
+ | **Search** | `SEARCH_TOOL` | `True` | Search GitHub repositories, issues, or code. Action-routed methods: `code`, `issues`, `repositories`. |
64
+ | **Org** | `ORG_TOOL` | `True` | Manage GitHub organizations. Action-routed methods: `members`, `repos`, `teams`. |
65
+ | **Collaborator** | `COLLABORATOR_TOOL` | `True` | Manage repository collaborators. Action-routed methods: `add`, `list`, `remove`. |
66
+ | **Action** | `ACTION_TOOL` | `True` | Manage GitHub actions workflows and runs. Action-routed methods: `cancel`, `delete_run`, `get_run`, `list_runs`, `list_workflows`, `rerun`, `trigger_dispatch`. |
67
+ | **Release** | `RELEASE_TOOL` | `True` | Manage repository releases. Action-routed methods: `create`, `delete`, `get`, `list`, `update`. |
68
+
69
+ Detailed tool schemas, parameter shapes, and validation constraints are preserved in [docs/mcp.md](docs/mcp.md).
70
+
71
+ ### Dynamic Tool Selection & Visibility
72
+
73
+ This MCP server supports dynamic toolset selection and visibility filtering at runtime. This allows you to restrict the set of exposed tools in order to prevent blowing up the LLM's context window.
74
+
75
+ You can configure tool filtering via multiple input channels:
76
+
77
+ - **CLI Arguments:** Pass `--tools` or `--toolsets` (or their disabled counterparts `--disabled-tools` and `--disabled-toolsets`) during startup.
78
+ - **Environment Variables:** Define standard environment variables:
79
+ - `MCP_ENABLED_TOOLS` / `MCP_DISABLED_TOOLS`
80
+ - `MCP_ENABLED_TAGS` / `MCP_DISABLED_TAGS`
81
+ - **HTTP SSE Request Headers:** Pass custom headers during transport initialization:
82
+ - `x-mcp-enabled-tools` / `x-mcp-disabled-tools`
83
+ - `x-mcp-enabled-tags` / `x-mcp-disabled-tags`
84
+ - **HTTP SSE Request Query Parameters:** Append query parameters directly to your transport connection URL:
85
+ - `?tools=tool1,tool2`
86
+ - `?tags=tag1`
87
+
88
+ When query strings or parameters are supplied, an LLM-free **Knowledge Graph resolution layer** (using `DynamicToolOrchestrator`) matches query intents against known tool tags, names, or descriptions, with safe fallback and automated 24-hour background cache refreshing.
89
+
90
+ ---
91
+
92
+ ### MCP Configuration Examples
93
+
94
+ #### stdio Transport (Recommended for local IDEs e.g., Cursor, Claude Desktop)
95
+ Configure your IDE's `mcp.json` to launch the MCP server via `uvx`:
96
+
97
+ ```json
98
+ {
99
+ "mcpServers": {
100
+ "github-agent": {
101
+ "command": "uvx",
102
+ "args": [
103
+ "--from",
104
+ "github-agent",
105
+ "github-mcp"
106
+ ],
107
+ "env": {
108
+ "GITHUB_URL": "your_github_url_here",
109
+ "GITHUB_VERIFY": "your_github_verify_here",
110
+ "DEBUG": "your_debug_here",
111
+ "PYTHONUNBUFFERED": "your_pythonunbuffered_here",
112
+ "GITHUB_TOKEN": "your_github_token_here"
113
+ }
114
+ }
115
+ }
116
+ }
117
+ ```
118
+
119
+ #### Streamable-HTTP Transport (Recommended for production deployments)
120
+ Configure your client's `mcp.json` to launch the Streamable-HTTP server via `uvx` with explicit host and port definition:
121
+
122
+ ```json
123
+ {
124
+ "mcpServers": {
125
+ "github-agent": {
126
+ "command": "uvx",
127
+ "args": [
128
+ "--from",
129
+ "github-agent",
130
+ "github-mcp"
131
+ ],
132
+ "env": {
133
+ "TRANSPORT": "streamable-http",
134
+ "HOST": "0.0.0.0",
135
+ "PORT": "8000",
136
+ "GITHUB_URL": "your_github_url_here",
137
+ "GITHUB_VERIFY": "your_github_verify_here",
138
+ "DEBUG": "your_debug_here",
139
+ "PYTHONUNBUFFERED": "your_pythonunbuffered_here",
140
+ "GITHUB_TOKEN": "your_github_token_here"
141
+ }
142
+ }
143
+ }
144
+ }
145
+ ```
146
+
147
+ Alternatively, connect to a pre-deployed remote or local Streamable-HTTP instance:
148
+
149
+ ```json
150
+ {
151
+ "mcpServers": {
152
+ "github-agent": {
153
+ "url": "http://localhost:8000/github-agent/mcp"
154
+ }
155
+ }
156
+ }
157
+ ```
158
+
159
+ Deploying the Streamable-HTTP server via Docker:
160
+
161
+ ```bash
162
+ docker run -d \
163
+ --name github-agent-mcp \
164
+ -p 8000:8000 \
165
+ -e TRANSPORT=streamable-http \
166
+ -e PORT=8000 \
167
+ -e GITHUB_URL="your_value" \
168
+ -e GITHUB_VERIFY="your_value" \
169
+ -e DEBUG="your_value" \
170
+ -e PYTHONUNBUFFERED="your_value" \
171
+ -e GITHUB_TOKEN="your_value" \
172
+ knucklessg1/github-agent:latest
173
+ ```
174
+
175
+ ---
176
+
177
+ ## Agent
178
+
179
+ This repository features a fully integrated Pydantic AI Graph Agent. It communicates over the **Agent Control Protocol (ACP)** and interacts seamlessly with the **Agent Web UI (AG-UI)** and Terminal interface.
180
+
181
+ ### Running the Agent CLI
182
+ To start the interactive command-line agent:
183
+
184
+ ```bash
185
+ # Set credentials
186
+ export GITHUB_URL="your_value"
187
+ export GITHUB_VERIFY="your_value"
188
+ export DEBUG="your_value"
189
+ export PYTHONUNBUFFERED="your_value"
190
+ export GITHUB_TOKEN="your_value"
191
+
192
+ # Run the agent server
193
+ github-agent --provider openai --model-id gpt-4o
194
+ ```
195
+
196
+ ### Docker Compose Orchestration
197
+ The following `docker/agent.compose.yml` configures the Agent, Web UI, and Terminal Interface together:
198
+
199
+ ```yaml
200
+ version: '3.8'
201
+
202
+ services:
203
+ github-agent-mcp:
204
+ image: knucklessg1/github-agent:latest
205
+ container_name: github-agent-mcp
206
+ hostname: github-agent-mcp
207
+ restart: always
208
+ env_file:
209
+ - ../.env
210
+ environment:
211
+ - PYTHONUNBUFFERED=1
212
+ - HOST=0.0.0.0
213
+ - PORT=8000
214
+ - TRANSPORT=streamable-http
215
+ ports:
216
+ - "8000:8000"
217
+ healthcheck:
218
+ test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
219
+ interval: 30s
220
+ timeout: 10s
221
+ retries: 3
222
+ start_period: 10s
223
+ logging:
224
+ driver: json-file
225
+ options:
226
+ max-size: "10m"
227
+ max-file: "3"
228
+
229
+ github-agent-agent:
230
+ image: knucklessg1/github-agent:latest
231
+ container_name: github-agent-agent
232
+ hostname: github-agent-agent
233
+ restart: always
234
+ depends_on:
235
+ - github-agent-mcp
236
+ env_file:
237
+ - ../.env
238
+ command: [ "github-agent" ]
239
+ environment:
240
+ - PYTHONUNBUFFERED=1
241
+ - HOST=0.0.0.0
242
+ - PORT=9016
243
+ - MCP_URL=http://github-agent-mcp:8000/mcp
244
+ - PROVIDER=${PROVIDER:-openai}
245
+ - MODEL_ID=${MODEL_ID:-gpt-4o}
246
+ - ENABLE_WEB_UI=True
247
+ - ENABLE_OTEL=True
248
+ ports:
249
+ - "9016:9016"
250
+ healthcheck:
251
+ test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:9016/health')"]
252
+ interval: 30s
253
+ timeout: 10s
254
+ retries: 3
255
+ start_period: 10s
256
+ logging:
257
+ driver: json-file
258
+ options:
259
+ max-size: "10m"
260
+ max-file: "3"
261
+
262
+ ```
263
+
264
+ Detailed graph node architecture explanations, custom skill configurations, and agentic trace guides are available in [docs/agent.md](docs/agent.md).
265
+
266
+ ---
267
+
268
+ ## Security & Governance
269
+
270
+ Built directly upon the enterprise-ready [`agent-utilities`](https://github.com/Knuckles-Team/agent-utilities) core, standard security parameters are fully supported:
271
+
272
+ ### Access Control & Policy Enforcement
273
+ - **Eunomia Policies:** Fine-grained, policy-driven tool authorization. Supports `none`, local `embedded` (`mcp_policies.json`), or centralized `remote` modes.
274
+ - **OIDC Token Delegation:** Compliant with RFC 8693 token exchange for flowing authenticating user credentials from Web UI / ACP → Agent → MCP.
275
+ - **Scoped Credentials:** Execution context runs restricted to the specific caller identity.
276
+
277
+ ### Runtime Security Grid
278
+ | Feature | Functionality | Enablement |
279
+ |---------|---------------|------------|
280
+ | **Tool Guard** | Sensitivity inspection with human-in-the-loop validation | Enabled by default |
281
+ | **Prompt Injection Defense** | Input scanning, repetition monitoring, and recursive loop blocks | Enabled by default |
282
+ | **Context Safety Guard** | Stuck-loop detectors and contextual overflow preemptive alerts | Enabled by default |
283
+
284
+ ---
285
+
286
+ ## Installation
287
+
288
+ Install the Python package locally:
289
+
290
+ ```bash
291
+ # Using uv (highly recommended)
292
+ uv pip install github-agent[all]
293
+
294
+ # Using standard pip
295
+ python -m pip install github-agent[all]
296
+ ```
297
+
298
+ ---
299
+
300
+ ## Repository Owners
301
+
302
+ <img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=Knucklessg1&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />
303
+
304
+ ![GitHub followers](https://img.shields.io/github/followers/Knucklessg1)
305
+ ![GitHub User's stars](https://img.shields.io/github/stars/Knucklessg1)
306
+
307
+ ---
308
+
309
+ ## Contribute
310
+
311
+ Contributions are welcome! Please ensure code quality by executing local checks before submitting pull requests:
312
+ - Format code using `ruff format .`
313
+ - Lint code using `ruff check .`
314
+ - Validate type-safety with `mypy .`
315
+ - Execute test suites using `pytest`
@@ -4,7 +4,7 @@ import os
4
4
  import sys
5
5
  import warnings
6
6
 
7
- __version__ = "0.11.1"
7
+ __version__ = "0.19.0"
8
8
 
9
9
  logging.basicConfig(
10
10
  level=logging.INFO,
@@ -0,0 +1 @@
1
+ # github_agent.api package