Converts the official GitHub MCP Server from stdio to streamable HTTP transport for AWS Bedrock AgentCore Runtime.
Enables AWS Bedrock agents to access GitHub repositories, issues, PRs, and code search through MCP.
source .venv/bin/activateexport GITHUB_PERSONAL_ACCESS_TOKEN=github_pat_XXXXXConfigure AWS credentials:
export AWS_ACCESS_KEY_ID=xxx
export AWS_SECRET_ACCESS_KEY=xxx
export AWS_SESSION_TOKEN=xxxConfigure AWS region:
export AWS_REGION=ap-southeast-2
export AWS_DEFAULT_REGION=ap-southeast-2Configure AgentCore runtime:
agentcore configure \
--entrypoint src/github_mcp_agentcore \
--name github_mcp_server \
--container-runtime docker \
--protocol MCPWarning
agentcore configure will overwrite the Dockerfile. Discard these changes in Git to restore the required configuration.
docker build --tag github-mcp-wrapper .
docker run \
--publish 8080:8080 \
--env GITHUB_PERSONAL_ACCESS_TOKEN="$GITHUB_PERSONAL_ACCESS_TOKEN" \
--env ENABLE_OTEL=false \
github-mcp-wrapperagentcore launch \
--local \
--env GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PERSONAL_ACCESS_TOKEN \
--env ENABLE_OTEL=falseNote
Set ENABLE_OTEL=false for local development to avoid OpenTelemetry configuration errors.
Use MCP Inspector to test the connection:
npx @modelcontextprotocol/inspectorConnection Settings:
- Transport: Streamable HTTP
- URL: http://0.0.0.0:8080/mcp
agentcore launch --env GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PERSONAL_ACCESS_TOKENGITHUB_PERSONAL_ACCESS_TOKEN- GitHub personal access token with repo permissions
ENABLE_OTEL- Enable OpenTelemetry instrumentation (default:true)LOG_LEVEL- Logging level (DEBUG,INFO,WARNING,ERROR)GITHUB_TOOLSETS- MCP toolsets to enable (default:"all")GITHUB_DYNAMIC_TOOLSETS- Enable dynamic toolset discovery (default:1)GITHUB_READ_ONLY- Read-only mode for security (default:1)
See the GitHub MCP Server README for all available environment options.