godelgate Book a demo

Developer quickstart

Build, test and change Godelgate.

#Run from source

bash
npm install
npm run dev        # restarts on file changes

#Test

bash
npm test           # unit and end-to-end tests
npm run typecheck

The end-to-end tests start a real gate on a random port and drive it with the MCP TypeScript SDK: authentication, tool listing, trifecta blocking, per-session isolation, approvals, the admin API, leads and the public demo. The Cloud tests add a local MCP server behind a test OAuth server, and cover sign-in, labels, conditional rules, teams, workspaces and CSV export.

#Project layout

PathWhat's in it
src/main.tsHTTP server: /mcp, admin API, public endpoints, pages and docs
src/gate.tsSessions, the call pipeline and the per-session MCP server
src/policy.tsDecision order, trifecta check and labels
src/upstream.tsConnections to MCP servers, tool pinning and quarantine
src/scanner.tsTool-description scanner and fingerprints
src/approvals.tsPending approvals and timeouts
src/accounts.tsCloud accounts, workspaces, sign-in sessions and API keys
src/workspaces.tsOne gate per workspace, built on first use and changed in place
src/catalog.tsThe catalog of remote MCP servers
src/oauth.tsOAuth sign-in to workspace servers
src/google.tsSign in with Google
src/sso.ts, src/scim.tsEnterprise SSO (OIDC, SAML), domain verification and SCIM
src/dlp.tsSecret and personal-data detection
src/telemetry.tsOpenTelemetry export and Prometheus metrics
src/openapi.tsREST APIs from OpenAPI documents
src/isolation.tsDocker and microVM isolation for local servers
src/llm.ts, src/chat.tsLLM proxy, cost tracking and the Chat agent
src/netguard.tsRefuses private and internal addresses for Cloud servers
src/secrets.tsEncryption of stored credentials
src/store.tsSQLite audit log, tool pins, leads and redaction
src/config.tsConfig schema and loading
src/demo.tsThe built-in demo server
src/docs.tsThis documentation site
public/Landing page, sign-up and sign-in, dashboard and images
docs/Documentation pages in Markdown
test/Tests

#Writing docs

Each page is a Markdown file in docs/ with a short header:

markdown
---
title: Page title
description: One sentence for search and link previews.
---

Add the page to the sidebar in src/docs.ts. Every page is also available as Markdown at /docs/<page>.md, and all pages together at /docs/llms-full.txt.