Skip to content

Add HTTP and SSE wrapper for GitHub MCP Server #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from

Conversation

thomcost
Copy link

@thomcost thomcost commented May 3, 2025

Summary

This PR adds an HTTP and Server-Sent Events (SSE) wrapper for the GitHub MCP Server, enabling HTTP-based communication with the MCP Server binary.

Features

  • HTTP endpoints for all GitHub MCP Server functionality
  • SSE (Server-Sent Events) support for streaming responses
  • Complete PR workflow implementation for creating branches and PRs
  • Helper scripts for starting the server and running tests
  • Updated documentation with usage examples

Testing

The implementation has been tested with:

  • Basic health and tool checks
  • Repository search and retrieval
  • Branch and file operations
  • Complete PR workflow that creates real branches and PRs

How to use

  1. Start the HTTP SSE server:

    ./start_http_sse_server.sh --port 7445
  2. Test the PR workflow:

    ./run_http_sse_pr_test.sh --owner OWNER --repo REPO
  3. Use the server directly:

    • GET /health - Health check
    • GET /user - Get authenticated user
    • GET /search/repositories?q=query - Search repositories
    • POST /tools/call - Call a specific tool
    • POST /sse - Server-Sent Events endpoint for streaming responses

🤖 Generated with Claude Code

Thomas Costello and others added 7 commits May 3, 2025 03:07
…r Binary

- Add detailed findings about response format and parsing
- Create HTTP SSE transport guide
- Add test scripts with proper response parsing
- Document tool name discrepancies and fixes
- Implement secure token handling
- Create demonstration scripts for response parsing
- Add testing guide with troubleshooting tips
- Add direct stdio transport test script
- Demonstrate response parsing with robust error handling
- Test multiple API endpoints (get_me, search_repositories, list_tools)
- Show correct usage of the response parsing logic
- Clarify that the tested binary only supports stdio transport
- Add instructions for creating a custom HTTP SSE wrapper
- Include complete wrapper implementation
- Update examples to use the wrapper
- Create custom HTTP wrapper for GitHub MCP Server Binary
- Add support for HTTP SSE transport protocol
- Forward JSON-RPC requests to the stdio transport
- Return responses as SSE events
- Add transport protocol limitations to key findings
- Include stdio_test.py in key test scripts section
- Add HTTP wrapper information to documentation summary
- Clarify that only stdio transport is directly supported
- Add minimal stdio-only test that sends one command and verifies response
- Add simple stdio test with more comprehensive output
- Verify nested response format with content[0].text
- Confirm that direct stdio transport works reliably
This commit adds the HTTP and SSE wrapper implementation for the GitHub MCP Server, including:

- HTTP wrapper that exposes GitHub MCP Server functionality through HTTP endpoints
- SSE (Server-Sent Events) support for streaming responses
- PR workflow test implementation that creates branches and PRs
- Scripts for starting the server and running tests
- Updated documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@thomcost thomcost requested a review from a team as a code owner May 3, 2025 12:05
@thomcost thomcost closed this May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant