GG

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

184 stars 58 forks Качество 82 Тренд 37MIT

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-агентам, работающим в песочнице.

Быстрый старт

  1. Извлечь изображение Docker (когда доступно):

  2. Создать конфигурационный файл (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.

  1. Запустить контейнер:

[! ПРИМЕЧАНИЕ] Для 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

  1. Pull the Docker image (when available):

    docker pull ghcr.io/github/gh-aw-mcpg:latest
    
  2. 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 gateway section is required, and it must include port, domain, and exactly one of agentId or agentIds. The values shown above are examples; omitting gateway — or any of these required fields — fails schema validation at startup. All other gateway fields are optional and are validated when present. Optional server fields include entrypoint, entrypointArgs, mounts, args, connectTimeout, and toolTimeout; see docs/CONFIGURATION.md for the complete server-field reference.

    Looking for complete examples? See config.example.toml, config.example-payload-threshold.toml, and example-http-config.json.

  3. 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 --config or --config-stdin; piping JSON configuration requires --config-stdin. The container entrypoint script (run_containerized.sh) automatically adds --config-stdin when it starts awmg. If you run awmg directly (outside the container) and want to pipe JSON config, you must pass --config-stdin explicitly.

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 match MCP_GATEWAY_PORT
Открыть полный README на GitHub

Установка

docker run --rm -i \
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "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": "" } } } }