Skip to content

mcpgw v0.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Nov 06:32

Fixed

  • Browser sign-in failed in real browsers. The connect page set
    referrer to no-referrer. Under the Fetch spec that makes browsers send
    Origin: null on the page's form POST, which the gateway's CSRF check
    rejected ("Not allowed"). Connect links and mcpgw login therefore never
    completed in Chrome, Edge or Firefox. The tests missed it because their
    simulated browser sent a normal Origin. The page now uses same-origin,
    which still keeps the ticket out of the Referer sent to the provider. A new
    Chromium test drives the real flow.
  • Connect links and requestState containing non-ASCII characters crashed
    HMAC verification (TypeError) and returned HTTP 500; they are now
    rejected normally.
  • A dynamic client registration endpoint that was unreachable or answered
    with non-JSON produced an unhandled 500 in the middle of sign-in. It now
    shows an error page saying what went wrong.
  • expires_in sent as a decimal string (e.g. "3599.5") crashed token saving.
  • mcpgw login against a running gateway reported "connected" at once when
    the server was already connected, before the new sign-in finished. It now
    waits for the sign-in it started.
  • mcpgw logout <unknown> printed a traceback when no gateway was running.
    A wrong API key against a running gateway gave a KeyError traceback.
    Both now print a one-line error.
  • Invalid config values (port = "abc", a non-table tools or headers,
    malformed TOML) raised raw Python errors; they are now config errors that
    name the bad key.
  • A corrupt credentials.json crashed every request with a JSON error. It is
    now reported clearly, and the file is left untouched.
  • The REST API answered 404 for invalid tool arguments; it now returns 400.
    It returns 404 only for unknown tools, prompts and resources.

Added

  • Prompts and resources aggregation. The gateway now serves
    prompts/list, prompts/get, resources/list,
    resources/templates/list and resources/read, in both protocol eras and
    on scoped endpoints.
    • Prompts are namespaced like tools (<server>__<prompt>).
    • Resource URIs pass through unchanged. Reads are routed by exact URI,
      template prefix, or links seen in tool results, with the owning server
      recorded in _meta["mcpgw/server"].
    • When a server isn't connected, the error carries a connect link (or
      -32042 URL elicitation for 2025-11-25 clients).
  • REST endpoints: GET /api/prompts, POST /api/prompts/get,
    GET /api/resources, POST /api/resources/read.
  • CLI:
    • mcpgw init writes a starter config.
    • mcpgw doctor checks the config, the state directory and each server's
      OAuth discovery and client registration, then lists tools.
    • mcpgw prompts, mcpgw prompt, mcpgw resources and mcpgw read use
      the new prompt and resource support.
    • mcpgw --version.
  • mcpgw serve shuts down gracefully on SIGTERM (docker stop).
  • Distribution:
    • published on PyPI as mcpgw-gateway (the command is still mcpgw);
    • a container image ghcr.io/invictus2076/mcpgw with compose.yaml;
    • GitHub Actions for CI (Linux, Windows and macOS; Python 3.11–3.13;
      Chromium; packaging; Docker) and for releases (GitHub release, PyPI
      trusted publishing, multi-arch image).
  • Project files: CONTRIBUTING.md, SECURITY.md, docs/releasing.md, issue
    and pull request templates, Dependabot, and the py.typed marker.
  • /api/servers rows include auth_generation.

Changed

  • The server's advertised capabilities now include prompts and resources
    (listChanged: false, subscribe: false).
  • Tests: 68 (from 41).