Skip to main content
Glama
byward

byward

Official

byward

OpenSSF Scorecard OpenSSF Best Practices

A sign-in gate for MCP servers. byward puts any MCP server, HTTP or stdio, behind OAuth 2.1 and your identity provider: Microsoft Entra ID first-class, Okta, Keycloak, Google, Auth0, or any OpenID Connect provider. One Go binary, configured by environment variables.

Latest release: v0.6.0. These docs follow main; the docs for a release are at its tag (v0.5.0). Pre-1.0, with no independent security audit yet: read the security posture.

How it works

MCP client ──OAuth 2.1──▶ byward ──sign-in──▶ your IdP (Entra ID, Okta, Keycloak, …)
 (Claude, ChatGPT,          │
  VS Code, Cursor…)         └──▶ MCP server (HTTP or stdio)
                                 never sees the client's or the IdP's token
  • MCP clients sign in with standard OAuth 2.1. byward is the authorization server: it signs the user in at your IdP, shows its own consent page, and issues short-lived tokens of its own.

  • Clients connect without manual setup, through Client ID Metadata Documents (CIMD) or Dynamic Client Registration (DCR). Static clients cover anything else.

  • The MCP server needs no auth code. It never gets the client's token (no token passthrough).

  • Access is gated by tenant, app roles and groups, a verified email domain or a Google Workspace domain, as the IdP provides them (access gate). Refresh tokens rotate with reuse detection, and operators can revoke a user or everyone.

  • Built to run: SQLite state for one replica, or PostgreSQL for several (postgres), rate limits on the OAuth endpoints, a structured audit stream, Prometheus metrics, and byward doctor to check a deployment.

Not a gateway: no routing or aggregation of several servers, and no policy language. byward authenticates and gates access; your MCP server decides what each user may do (scope and non-goals).

Related MCP server: ado-mcp-gateway

Verified clients

Signed in through byward against a real Entra tenant and called a tool (last run 2026-11-28, on main at 394659d, after v0.4.1):

Client

How it registers

Claude Code 2.1.311

CIMD (a static client also works; last run on the v0.2 code)

claude.ai (web, 2026-11-28)

CIMD

ChatGPT developer mode (web, 2026-11-28)

CIMD

VS Code 1.142.0

CIMD

Cursor 3.30.8

DCR

The TypeScript, Python and Go MCP SDK clients and MCP Inspector run against byward in CI.

Try it

Without an IdP, on your own machine: --insecure-no-auth serves an MCP server with no sign-in at all, on loopback only, to see byward relay requests before you set up an IdP (ADR-0027):

byward --insecure-no-auth --public-url http://127.0.0.1:8080/mcp --upstream-url http://127.0.0.1:3001/mcp

With Entra: the Entra quickstart registers the app (or byward init entra prints the commands for you) and then runs byward in front of your MCP server. For another IdP, start with its guide (Okta, Keycloak, Google, Auth0, any OIDC IdP); the settings below then use BYWARD_IDP and BYWARD_OIDC_* instead of BYWARD_ENTRA_*.

docker run --rm -p 8080:8080 --user "$(id -u):$(id -g)" \
  -v "$PWD/byward-data:/var/lib/byward" \
  -v "$PWD/entra-client-secret:/run/secrets/entra-client-secret:ro" \
  -e BYWARD_PUBLIC_URL=https://mcp.example.com/mcp \
  -e BYWARD_UPSTREAM_URL=http://upstream:3001/mcp \
  -e BYWARD_ENTRA_TENANT="$TENANT_ID" \
  -e BYWARD_ENTRA_CLIENT_ID="$APP_ID" \
  -e BYWARD_ENTRA_CLIENT_SECRET_FILE=/run/secrets/entra-client-secret \
  -e BYWARD_LISTEN=0.0.0.0:8080 \
  ghcr.io/byward-dev/byward:v0.6.0

upstream is your MCP server's address as the container sees it (the quickstart runs both on one Docker network).

TLS usually ends at your ingress or reverse proxy; byward can also serve it with your certificate (TLS). Then work through the hardening checklist.

Images and archives are signed with cosign and carry build provenance; how to verify them: packaging.

Documentation

I want to…

Read

Try it on my machine

Try it above, or Keycloak on your machine

Connect my identity provider

Entra quickstart · Okta · Keycloak · Google · Auth0 · several identity providers

Deploy it

deploy · hardening checklist

Put a stdio MCP server behind it

stdio upstreams

Control who gets in, and revoke access

access gate · revoke access

Call downstream APIs as the user

downstream APIs (On-Behalf-Of)

Look up a setting, command or metric

settings · commands · observability

Understand the security model

security posture · decisions

Everything else: the docs index.

Development

mise run check runs everything CI runs; setup is in CONTRIBUTING.md.

Contributing

See CONTRIBUTING.md (including the AI-assistance policy) and the Code of Conduct. Report vulnerabilities privately: SECURITY.md.

MCP is a trademark of LF Projects, LLC. byward is an independent project.

License

Apache-2.0

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      A self-hosted remote MCP server for Azure DevOps that bridges OAuth 2.1 between MCP clients and Microsoft Entra ID, enabling any OAuth-capable client (e.g., Claude Code, Claude Desktop) to access Azure DevOps resources.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Puts a single OAuth 2.1 authorization gateway in front of self-hosted MCP servers, letting Claude.ai and other OIDC-backed clients sign users in and receive tokens scoped to one person and one service. Wraps stdio or Streamable HTTP upstreams behind one hostname with a path per service, with allowlisted redirects, hashed stored tokens, and per-tool audit lines.
      Apache 2.0