HI

helv-io/skgate

Developer tools
13 stars 0 forks Quality 82 Trend 40MIT

Self-hosted MCP gateway and LLM proxy. Serve any MCP server or REST API behind OAuth 2.1, run stdio/git MCP servers on demand, and proxy AI providers (OpenAI, Anthropic, Gemini, Grok, Ollama) through...

Overview

Self-hosted MCP gateway and LLM proxy. Serve any MCP server or REST API behind OAuth 2.1 from one address, and proxy your LLM providers (OpenAI, Anthropic, Gemini, Grok, Ollama and more) through one OpenAI-compatible API with model aliases and virtual keys. Your Grok subscription works too, no API key needed. Any MCP server. skgate can run them for you, so you do not need one container per server. "sk" is how a lot of SI API keys start, and "gate" is for gateway. Not a great name, but it's ours. The plane in the logo is an inside joke. The public wouldn't understand it, and I'm not about to explain it. Sorry. You need an OIDC provider with a confidential client for skgate. Admin login is OIDC only. Trying it on one machine? docs/quickstart.md runs skgate with a bundled provider and no accounts. 1. docker compose up -d 2. Open https://skgate.example.com/admin and sign in through your OIDC provider. 3.

README

skgate

Self-hosted MCP gateway and LLM proxy. Serve any MCP server or REST API behind OAuth 2.1 from one address, and proxy your LLM providers (OpenAI, Anthropic, Gemini, Grok, Ollama and more) through one OpenAI-compatible API with model aliases and virtual keys. Your Grok subscription works too, no API key needed.

Any MCP server. skgate can run them for you, so you do not need one container per server.

Name Origin

skgate /ɛsˈkɑːɡeɪt/ (ess-KAH-gate)

“sk” is how a lot of SI API keys start, and “gate” is for gateway. Not a great name, but it’s ours.

The plane in the logo is an inside joke. The public wouldn’t understand it, and I’m not about to explain it. Sorry.

Quality

Quick start

You need an OIDC provider with a confidential client for skgate. Admin login is OIDC only. Trying it on one machine? docs/quickstart.md runs skgate with a bundled provider and no accounts.

# docker-compose.yml
services:
  skgate:
    container_name: skgate
    image: ghcr.io/helv-io/skgate:latest
    restart: always
    ports:
      - 8080:8080
    environment:
      - PUBLIC_URL=https://skgate.example.com
      - OIDC_ISSUER=https://auth.example.com
      - OIDC_CLIENT_ID=skgate
      - OIDC_CLIENT_SECRET=change-me
    volumes:
      - ./data:/data
    healthcheck:
      test: ["CMD", "/skgate", "healthcheck"]
      interval: 30s
      timeout: 5s
      retries: 3
  1. docker compose up -d
  2. Open https://skgate.example.com/admin and sign in through your OIDC provider.
  3. mcp upstreams > Add upstream: a remote MCP server, or a GitHub repository, npm package, or PyPI package that skgate runs for you (see Add an MCP server with Suggest configuration).
  4. Point your MCP client at https://skgate.example.com/mcp or the site root for every included upstream, or at https://skgate.example.com/mcp/ for one upstream. Sign in when it asks.

Image tags:

  • latest: proxy + managed MCP servers. Bundles Node.js (npx), pnpm, Bun (bunx), Deno, Python (uv, uvx), Go, .NET and git.
  • slim: proxy only

To upgrade, back up ./data, then docker compose pull && docker compose up -d.

Proxy your SI providers

skgate is also an OpenAI-compatible API in front of your SI providers. Point your apps at one address; switch the provider behind them without changing the apps. User-defined model aliases give your apps a stable model name of your choosing.

Grok can use subscription sign-in with no API key. Other providers use that provider’s API key (OpenAI, Anthropic, Gemini, Mistral, DeepSeek, Groq, OpenRouter, Ollama, LM Studio, and any OpenAI-compatible endpoint).

  1. status > Grok > Sign in: open the shown address, enter the code, approve. skgate keeps the sign-in fresh.
  2. keys > enter a name > Create key. Copy the sk-... key; it is shown once.
  3. Use it: base URL https://skgate.example.com/v1, API key sk-... (see Examples).
    • These base URLs all reach the same API: /v1, /api, /api/v1, and the bare host. Use whichever form your client expects.
  4. Other providers: status > Add provider, pick one and enter its API key. Type the provider’s address in any form; skgate finds the one that works.

Examples

Features

Feature What it does
Grok sign-in Device code or browser paste-back; tokens refresh
Other providers OpenAI, Anthropic, Gemini and more by API key (docs)
Model aliases User-defined model names; change the target once
API /v1, /api/v1, /api, no prefix; SSE (docs)
Virtual keys Hashed; tokens in/out per key (docs)
MCP Remote, stdio and git servers behind OAuth 2.1 (docs)
Live tool updates Connected clients hear when an upstream’s tools change after an update, a reinstall or a tool switched on or off, and pick up the new tools without reconnecting
REST APIs as tools Give an OpenAPI description, pick the operations (or let Suggest names and selection name them and pick a core set), and MCP clients get them as tools (docs)

Tested MCP clients

Clients tested by the author against a live skgate. Status is what happened, not a promise.

Client Status Notes
ChatGPT OK
Claude OK
Grok OK
Hermes OK
Open WebUI OK Use OAuth 2.1; register and authorize the client.
Gemini Warning Connects, but never calls tools.
Home Assistant Warning Needs a manual OAuth client ID and secret. Only one MCP upstream can be used.
Cline Untested
Continue Untested
Cursor OK
Goose Untested
LibreChat Untested
VS Code Untested
Windsurf Untested
Zed Untested

How skgate compares

A rough guide from each project’s docs as of 2026-10-13. Check them for current features.

skgate LiteLLM MetaMCP
OpenAI-compatible LLM proxy Yes Yes, 100+ providers No
MCP gateway Yes Yes Yes
Runs stdio MCP servers Yes, started on demand, stopped when idle Yes, off unless LITELLM_ENABLE_MCP_STDIO=true Yes
OAuth for MCP clients OAuth 2.1 with dynamic client registration Yes, dynamic client registration at the gateway Yes, MCP spec 2025-06-18 OAuth
Database SQLite, one container Postgres for virtual keys Postgres (Docker Compose)

Comparison

How each provider signs in elsewhere, and how skgate connects to it:

Provider Subscription sign-in elsewhere In skgate
xAI Grok * OpenCode; more planned [1] Subscription
Anthropic Claude Not offered to third parties [2] API key
DeepSeek None API key
Google Gemini * CLI login not for reuse [3] API key
Groq * None API key
Mistral * None API key
OpenAI Sign in with ChatGPT [4] API key
OpenRouter * None API key
LM Studio None No key (local)
Ollama None No key (local)

* Free tier available.

As of 2026-10-05; check each provider’s terms. GitHub Copilot is not a skgate provider.

Configuration

Set these under environment: or in an env_file. Placeholders are in .env.example.

Variable Default Purpose
PUBLIC_URL http://localhost:8080 Public origin, no trailing slash.
OIDC_ISSUER Issuer URL, equal to the provider’s discovery issuer.
OIDC_CLIENT_ID, OIDC_CLIENT_SECRET Confidential client credentials.
OIDC_SCOPES openid profile email groups Requested scopes.
OIDC_REDIRECT_URL PUBLIC_URL/admin/oidc/callback Callback registered at the provider.
OIDC_ALLOWED_EMAILS, OIDC_ALLOWED_GROUPS empty Comma lists limiting who is admin.
MCP_OAUTH_REQUIRE_CONSENT true Approve/Deny page after login at /authorize.
SECRETS_KEY random secrets.key file Encrypts stored upstream secrets. 32-byte base64 (openssl rand -base64 32), or a passphrase, stretched with scrypt.
GITHUB_TOKEN empty Optional GitHub token for Suggest when it reads a repository. An upstream’s own access token takes precedence. Raises GitHub’s rate limit.
UPDATE_CHECK true The version in the header turns yellow when a newer release exists; false turns the check off.
LISTEN_ADDR :8080 Listen address.
DB_PATH /data/skgate.db SQLite file.
LOG_LEVEL info info or debug.
LOG_LINES 1000 Lines of output kept per managed process (its current and previous run, at most 512 KB).
TZ UTC Time zone for the UI and logs, for example America/New_York.
PUID, PGID 1000 Run-as ids; never 0, 65534 or 61000-64999 (managed servers use those).
MANAGED_DIR /data/managed Work dirs and clones of managed upstreams.
MANAGED_MAX_PROCS 0 Concurrent managed processes; 0 is unlimited.

Grok needs no variables. Sign in on the status page. Model aliases are the Aliases control on that card.

Everything lives in /data (skgate.db, secrets.key): back up both.

Reverse proxy

Set PUBLIC_URL to the public https origin.

Do not put forward-auth on /v1, /api, /mcp, /sse, /messages, /authorize, /token, /register, or /.well-known.

Only Traefik is tested by the author. Open an issue with what you tried.

OIDC setup

Client setting Value
Type Confidential, client_secret_basic or client_secret_post
Flow Authorization code with PKCE S256
Redirect URI https://skgate.example.com/admin/oidc/callback
Scopes openid profile email groups (if groups is rejected: OIDC_SCOPES=openid profile email)
ID token Asymmetric signature (RS, PS, ES, EdDSA); discovery issuer equal to OIDC_ISSUER

Without OIDC_ISSUER, OIDC_CLIENT_ID and OIDC_CLIENT_SECRET, skgate starts but the admin stays closed.

Every user your provider lets in is an admin. Restrict the provider, or set OIDC_ALLOWED_EMAILS / OIDC_ALLOWED_GROUPS.

Hints for Authelia, Authentik, Keycloak, Zitadel and Pocket ID: docs/oidc.md.

Security notes

  • Virtual keys are stored as SHA-256 hashes; upstream credentials are AES-256-GCM encrypted.
  • /authorize needs an admin session.
  • Managed upstreams run admin-supplied commands; use the slim image to disable them.
  • /register, /token, /authorize and admin forms cut off a request body that arrives too slowly. Uploads and streams (/v1, /mcp) have no such limit.
  • A key can be allowed in the URL (?key=) for clients that cannot send headers. It is off per key by default, because URLs leak into logs, history and referrers.

More, including the known trade-offs: operations.

Built with SI assistance

skgate is built with SI assistance: coding agents write much of the code, tests and docs.

Every change is reviewed by the author, and the security paths (OAuth, tokens, secrets) are human reviewed and tested. Reviews by frontier models are a supplement, not a substitute. Issues and pull requests that put it to the test are welcome.

Development

go build ./... && go vet ./... && go test ./...

docs/development.md. Contributors and agents: AGENT.md.

License

MIT, see LICENSE.

Star History

View this README on GitHub

Install

uvx mcp-server-time

Configuration

{"mcpServers": {"skgate": {"type": "http", "url": "https://skgate.example.com/mcp/<alias>", "headers": {"Authorization": "Bearer sk-..."}}}}