Skip to content

Commit 6b7057f

Browse files
Copilotphrocker
andauthored
Add GitHub MCP server integration to integration-proxy with agent proxy support (#41)
* Initial plan * Add GitHub MCP server integration to integration-proxy Co-authored-by: phrocker <[email protected]> * Update build scripts and documentation for GitHub integration Co-authored-by: phrocker <[email protected]> * Fix code review issues: HttpStatus constants, values.yaml, and env variables Co-authored-by: phrocker <[email protected]> * Add null safety checks and fix environment file formatting Co-authored-by: phrocker <[email protected]> * Add proxy endpoint and abstract integration management - Created IntegrationServerManager abstract base class for reusable K8s management - Refactored GitHubMCPServerService to extend IntegrationServerManager - Added GitHubMCPProxyService for forwarding MCP requests to GitHub servers - Added /api/v1/github/mcp/proxy endpoint for agents to communicate with MCP server - Updated tests to cover new proxy functionality - Updated documentation with proxy endpoint usage examples This enables agents to directly communicate with GitHub MCP servers while abstracting the Kubernetes management logic for future integrations. Co-authored-by: phrocker <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: phrocker <[email protected]>
1 parent a0d66f1 commit 6b7057f

File tree

14 files changed

+1393
-4
lines changed

14 files changed

+1393
-4
lines changed

.gcp.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ SENTRIUS_KEYCLOAK_VERSION=1.0.10
44
SENTRIUS_AGENT_VERSION=1.0.19
55
SENTRIUS_AI_AGENT_VERSION=1.0.0
66
LLMPROXY_VERSION=1.0.0
7-
LAUNCHER_VERSION=1.0.0
7+
LAUNCHER_VERSION=1.0.0
8+
GITHUB_MCP_VERSION=1.0.0

.local.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ LAUNCHER_VERSION=1.0.91
1111
AGENTPROXY_VERSION=1.0.92
1212
SSHPROXY_VERSION=1.0.91
1313
RDPPROXY_VERSION=1.0.122
14+
GITHUB_MCP_VERSION=1.0.0

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ sub-projects:
1010
core – Handles the core functionalities (e.g., SSH session management, zero trust policy enforcement).
1111
api – Provides a RESTful API layer to interface with the core module.
1212
dataplane – Offers dataplane functionality for secure data transfer and processing.
13-
integration-proxy – A proxy service that integrates with large language models (LLMs) to enhance security and compliance in SSH sessions.
13+
integration-proxy – A proxy service that integrates with large language models (LLMs) and external services (like GitHub, JIRA) to enhance security and compliance. Supports dynamic MCP (Model Context Protocol) server management for GitHub integrations.
1414
llm-dataplane – A data processing layer that leverages LLMs for advanced analysis and decision-making in SSH sessions.
1515
ops-scripts – Contains operational scripts for deployment and management tasks.
1616
ai-agent – Java-based intelligent agent framework for monitoring and controlling SSH sessions.
@@ -28,6 +28,7 @@ Table of Contents
2828
Running Sentrius
2929
Helm Chart Deployment
3030
Testing
31+
Integrations
3132
Custom Agents
3233
Usage
3334
API Documentation
@@ -396,6 +397,50 @@ The charts support multiple deployment environments with different configuration
396397

397398
For comprehensive testing documentation including CI/CD testing, local testing, and troubleshooting, see [docs/helm-testing.md](docs/helm-testing.md).
398399

400+
## Integrations
401+
402+
Sentrius supports external service integrations through the integration-proxy module, providing secure, zero-trust access to external APIs and services.
403+
404+
### GitHub Integration
405+
406+
The GitHub MCP (Model Context Protocol) integration enables secure access to GitHub repositories, issues, and pull requests through dynamically launched MCP server containers.
407+
408+
**Features:**
409+
- Query GitHub issues and pull requests
410+
- Access repository information
411+
- Clone and interact with repositories
412+
- All operations use zero-trust security model
413+
414+
**Setup:**
415+
416+
1. **Store GitHub Token:**
417+
Create an `IntegrationSecurityToken` with:
418+
- `connectionType`: "github"
419+
- `connectionInfo`: Your GitHub Personal Access Token
420+
421+
2. **Launch MCP Server:**
422+
```bash
423+
curl -X POST "http://integration-proxy:8080/api/v1/github/mcp/launch?tokenId=<TOKEN_ID>" \
424+
-H "Authorization: Bearer <JWT_TOKEN>"
425+
```
426+
427+
3. **Access via Service URL:**
428+
The response includes a `serviceUrl` for accessing the GitHub MCP server within the cluster.
429+
430+
For detailed documentation, see [integration-proxy/GITHUB_INTEGRATION.md](integration-proxy/GITHUB_INTEGRATION.md).
431+
432+
### JIRA Integration
433+
434+
The JIRA integration provides secure proxy access to JIRA APIs for ticket management and tracking.
435+
436+
**Available Endpoints:**
437+
- `/api/v1/jira/rest/api/3/search` - Search for JIRA issues
438+
- `/api/v1/jira/rest/api/3/issue` - Get issue details
439+
- `/api/v1/jira/rest/api/3/issue/comment` - Manage issue comments
440+
- `/api/v1/jira/rest/api/3/issue/assignee` - Assign issues
441+
442+
All JIRA requests are authenticated through Keycloak and validated against the user's permissions.
443+
399444
## Custom Agents
400445

401446
Sentrius supports both Java and Python-based custom agents that can extend the platform's functionality for monitoring, automation, and user assistance.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# GitHub MCP Server Docker Image
2+
FROM node:20-alpine
3+
4+
# Install git (required for repository operations)
5+
RUN apk add --no-cache git
6+
7+
# Create app directory
8+
WORKDIR /app
9+
10+
# Clone and build the github-mcp-server
11+
RUN git clone https://github.com/github/github-mcp-server.git . && \
12+
npm install && \
13+
npm run build
14+
15+
# Expose the port for MCP server (using stdio by default, but we'll add HTTP support)
16+
EXPOSE 3000
17+
18+
# Environment variables for GitHub token will be passed at runtime
19+
ENV GITHUB_PERSONAL_ACCESS_TOKEN=""
20+
21+
# Run the MCP server
22+
CMD ["node", "dist/index.js"]

0 commit comments

Comments
 (0)