
Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
github/gh-aw-mcpg — это кандидат на MCP-сервер, импортированный из https://github.com/github/gh-aw-mcpg.
Обзор
github/gh-aw-mcpg — это кандидат на MCP-сервер, импортированный из https://github.com/github/gh-aw-mcpg.
Обзор (машинный перевод)
Шлюз для серверов Model Context Protocol (MCP).
Этот шлюз используется с GitHub Agentic Workflows через конфигурацию sandbox.mcp для предоставления MCP-серверу доступа к AI-агентам, работающим в песочнице.
Быстрый старт
-
Извлечь изображение Docker (когда доступно):
-
Создать конфигурационный файл (
config.json):
Примечание: для конфигурации JSON stdin раздел gateway является required, и он должен включать port, domain и ровно один из agentId или agentIds. Приведённые выше значения являются примерами; исключение gateway — или любого из этих обязательных полей — не приводит к проверке схемы при запуске. Все остальные поля gateway являются необязательными и проверяются при наличии. Необязательные серверные поля включают entrypoint, entrypointArgs, mounts, args, connectTimeout и toolTimeout; см. docs/CONFIGURATION.md для полной ссылки на серверное поле.
Ищете полные примеры? См. config.example.toml, config.example-payload-threshold.toml и example-http-config.json.
- Запустить контейнер:
[! ПРИМЕЧАНИЕ] Для CLI требуется либо
--config, либо--config-stdin; для конфигурации трубопровода JSON требуется--config-stdin.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
MCP Gateway
A gateway for Model Context Protocol (MCP) servers.
This gateway is used with GitHub Agentic Workflows via the sandbox.mcp configuration to provide MCP server access to AI agents running in sandboxed environments.
Quick Start
-
Pull the Docker image (when available):
docker pull ghcr.io/github/gh-aw-mcpg:latest -
Create a configuration file (
config.json):{ "gateway": { "port": 8000, "domain": "${MCP_GATEWAY_DOMAIN}", "agentId": "${MCP_GATEWAY_AGENT_ID}" }, "mcpServers": { "github": { "type": "stdio", "container": "ghcr.io/github/github-mcp-server:latest", "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "" } } } }Note: for JSON stdin configuration the
gatewaysection is required, and it must includeport,domain, and exactly one ofagentIdoragentIds. The values shown above are examples; omittinggateway— or any of these required fields — fails schema validation at startup. All othergatewayfields are optional and are validated when present. Optional server fields includeentrypoint,entrypointArgs,mounts,args,connectTimeout, andtoolTimeout; see docs/CONFIGURATION.md for the complete server-field reference.Looking for complete examples? See
config.example.toml,config.example-payload-threshold.toml, andexample-http-config.json. -
Run the container:
docker run --rm -i \ -e MCP_GATEWAY_PORT=8000 \ -e MCP_GATEWAY_DOMAIN=localhost \ -e MCP_GATEWAY_AGENT_ID=your-agent-id \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /path/to/logs:/tmp/gh-aw/mcp-logs \ -p 8000:8000 \ ghcr.io/github/gh-aw-mcpg:latest < config.json
[!NOTE] The CLI requires either
--configor--config-stdin; piping JSON configuration requires--config-stdin. The container entrypoint script (run_containerized.sh) automatically adds--config-stdinwhen it startsawmg. If you runawmgdirectly (outside the container) and want to pipe JSON config, you must pass--config-stdinexplicitly.
Inside the container, the gateway starts in routed mode on http://0.0.0.0:8000, proxying MCP requests to your configured backend servers. When running awmg directly without --listen, the default listen address is http://127.0.0.1:3000.
Required flags:
-i: Enables stdin for passing JSON configuration-v /var/run/docker.sock: Required when using the default Docker runtime- Dockerless Podman mode (
"gateway": {"dockerless": true}) does not use the Docker socket; grant the container the capabilities required for nested containers (for example,--privileged) -p 8000:8000: Port mapping must matchMCP_GATEWAY_PORT
Установка
docker run --rm -i \Конфигурация
{
"gateway": {
"port": 8000,
"domain": "${MCP_GATEWAY_DOMAIN}",
"agentId": "${MCP_GATEWAY_AGENT_ID}"
},
"mcpServers": {
"github": {
"type": "stdio",
"container": "ghcr.io/github/github-mcp-server:latest",
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": ""
}
}
}
}