Agentic Gateway MCP server
Commit Oct 25, 2026A self-hosted agentic AI runtime that provides multi-provider LLM routing, DAG orchestration, and MCP host integration.
Also known as DojoGenesis/gateway
- Stars
- 2
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Oct 25, 2026
- License
- Apache-2.0
What is Agentic Gateway MCP?
Agentic Gateway is a self-hosted agentic AI runtime that provides multi-provider LLM routing, DAG orchestration, and MCP host integration.
Summary generated from the project's README
About Agentic Gateway MCP server
Developers looking to manage complex AI workflows can use this self-hosted agentic runtime to centralize model access and task execution. It functions as a single Go binary that provides multi-provider LLM routing across eight different providers, including Anthropic, OpenAI, Google Gemini, and Ollama. By setting API keys in a local environment file, users can route requests through a single interface that includes an intent classifier and fallback mechanisms.
The system integrates MCP host capabilities via stdio, SSE, and streamable_http transports, allowing it to act as a central hub for various tools and skills. It manages complex operations through DAG-based task planning and execution, supported by a tiered skill executor containing 89 different skills. Users can interact with the runtime through an OpenAI-compatible API, a built-in Svelte 5 chat interface, or a workflow builder SPA. The architecture also includes content-addressable storage and semantic memory compression to handle conversation history and data retrieval efficiently.
What you can do with it
- 1Multi-provider model routingRoute chat completions across different LLM providers like Anthropic, OpenAI, or Groq using a single API endpoint.
- 2Complex task orchestrationExecute multi-step agentic workflows using directed acyclic graph planning.
- 3MCP tool integrationConnect to various MCP servers using multiple transport protocols to expand agent capabilities.
- 4Semantic memory managementStore and retrieve conversation context using semantic search and compressed memory.
Written from the project's README. Every use case is checked against a quote from it.
Configuration
ALLOWED_ORIGINSDOJO_GATEWAY_URLOTEL_ENABLEDOTEL_EXPORTER_OTLP_ENDPOINTOTEL_SERVICE_NAME
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachabledojogenesis/gateway is public and reachablegithub.com/dojogenesis/gateway ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-10-25github.com/dojogenesis/gateway ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubAgentic Gateway
Self-hosted agentic AI runtime. Multi-provider LLM routing, DAG orchestration, content-addressable skill storage, and real-time SSE observability in a single Go binary.
Quick Start
# Clone and build from source
git clone https://github.com/DojoGenesis/gateway.git
cd gateway
cp .env.example .env # add your API keys
make build
./bin/agentic-gateway # listening on :7340
# Or with Docker
docker compose -f docker-compose.example.yml up -d
# Or download a pre-built binary (macOS Apple Silicon)
curl -L https://github.com/DojoGenesis/gateway/releases/latest/download/agentic-gateway_darwin_arm64.tar.gz | tar xz
./agentic-gateway
The gateway is now running at http://localhost:7340. Send a chat completion:
curl -X POST http://localhost:7340/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"Hello"}]}'
Architecture
152K lines of Go across 19 independently-versioned modules in a Go workspace (go.work). Each module has its own go.mod and can be versioned, tested, and imported independently.
┌─────────────────────────────┐
│ Chat UI / Workflow UI │
│ (embedded Svelte 5 SPAs) │
└──────────────┬──────────────┘
│
┌──────────────▼──────────────┐
│ server (Gin HTTP) │
│ Auth, Conversations, Admin │
│ Templates, Documents/RAG │
│ CAS API, Mesh, WebSocket │
└──────────────┬──────────────┘
│
┌───────────┬───────────┬────┴────┬───────────┬───────────┐
│ │ │ │ │ │
┌────▼───┐ ┌────▼───┐ ┌────▼───┐ ┌───▼────┐ ┌───▼────┐ ┌───▼────┐
│provider│ │ tools │ │ memory │ │ mcp │ │ skill │ │ apps │
│8 provs │ │33 tools│ │semantic│ │3 trans-│ │89 skills│ │MCP Apps│
│gRPC │ │registry│ │compress│ │ports │ │Tiers 0-3│ │host │
└────────┘ └────────┘ └────────┘ └────────┘ └────────┘ └────────┘
│ │ │ │ │
┌────▼───────────▼───────────▼─────────▼───────────▼───────────┐
│ orchestration │
│ DAG-based task planning + execution │
└──────────────────────────┬────────────────────────────────────┘
│
┌──────────┬───────────┬───┴───┬───────────┬───────────┐
│ │ │ │ │ │
┌──▼───┐ ┌──▼───┐ ┌────▼──┐ ┌──▼───┐ ┌───▼────┐ ┌──▼───────┐
│actor │ │ cas │ │d1client│ │event │ │ wasm │ │disposition│
│super-│ │content│ │D1 edge│ │event │ │sandbox │ │ADA agent │
│vision│ │addr. │ │ sync │ │ bus │ │execute │ │personality│
└──────┘ └──────┘ └───────┘ └──────┘ └────────┘ └──────────┘
runtime/* (standalone)
Providers
The gateway routes LLM requests across providers. Set the corresponding API key in .env to enable a provider -- providers without keys are silently skipped at startup.
| Provider | Env Var | Notes |
|---|---|---|
| Anthropic (Claude) | ANTHROPIC_API_KEY |
|
| OpenAI | OPENAI_API_KEY |
Custom base URL via OPENAI_BASE_URL |
| Google (Gemini) | GOOGLE_API_KEY |
|
| Groq | GROQ_API_KEY |
|
| Mistral | MISTRAL_API_KEY |
|
| DeepSeek | DEEPSEEK_API_KEY |
Custom base URL via DEEPSEEK_BASE_URL |
| Kimi (Moonshot) | KIMI_API_KEY |
Custom base URL via KIMI_BASE_URL |
| Ollama | OLLAMA_HOST |
Auto-detected on localhost:11434; text-mode tool fallback for models without native tool support |
Explicit provider/model in the request always overrides the intent classifier. The classifier is fallback only.
Module Overview
| Module | Description |
|---|---|
shared |
Cross-cutting types: Message, ToolCall, Usage, TaskStatus (root package) |
events |
SSE event catalog, 254-line schema (root package) |
provider |
gRPC-based model provider plugin system (8 providers) |
tools |
Tool registry and execution engine (33 tools) |
memory |
Conversation memory with semantic compression |
mcp |
MCP host integration -- stdio, SSE, and streamable_http transports |
orchestration |
Standalone DAG-based task planning and execution |
disposition |
ADA agent personality and behavior config (v1.0.0 contract) |
skill |
Tiered skill executor (89 skills across Tiers 0-3) |
apps |
MCP Apps host infrastructure -- resource serving, tool proxy |
workflow |
Durable workflow execution engine |
integration |
Integration testing harness |
runtime/actor |
Actor supervision tree |
runtime/cas |
Content-addressable storage |
runtime/d1client |
Cloudflare D1 client for edge sync |
runtime/event |
Event bus and routing |
runtime/wasm |
WASM sandbox execution |
wasm-modules/dip-scorer |
DIP scoring compiled to WASM |
server |
HTTP API server: Gin router, agent logic, auth, handlers, middleware, streaming |
API Routes
Core
POST /v1/chat/completions OpenAI-compatible chat completions
GET /v1/models List available models across providers
GET /events SSE stream (real-time agent observability)
GET /health Health check
GET /metrics Prometheus metrics
Agent Management
POST /v1/gateway/agents Create agent with disposition
GET /v1/gateway/agents List agents
GET /v1/gateway/agents/:id Get agent
POST /v1/gateway/agents/:id/chat Chat with agent (streaming, tool-calling loop)
Conversations (authenticated)
GET /v1/conversations List conversations
POST /v1/conversations Create conversation
GET /v1/conversations/:id Get conversation with messages
DELETE /v1/conversations/:id Delete conversation
POST /v1/conversations/:id/messages Send message
Content-Addressable Storage
GET /api/cas/refs List all CAS refs
POST /api/cas/refs Store content by ref
GET /api/cas/content/:ref Retrieve content by ref
POST /api/cas/tags Create a tag
GET /api/cas/delta D1 sync delta
PUT /api/cas/batch Batch sync
Tools and Skills
GET /v1/tools List registered tools
POST /v1/tools/:name/invoke Invoke a tool by name (admin role for tools that reach the host)
GET /v1/gateway/tools Gateway tool discovery (MCP namespace support)
Tools that execute code or reach the host's files or network (run_command,
execute_python, read_file, write_file, fetch_url, api_call, ...) and
every tool not explicitly classified, including MCP-hosted tools, require the
admin role on every route that can invoke them. run_command and
execute_python additionally require WORKFLOW_RUN_COMMAND_ENABLED, which is
off by default in production. The classification lives in
server/tool_invoke_gate.go.
Memory
POST /v1/memory Store memory
GET /v1/memory List memories
POST /v1/memory/search Semantic search
Admin (requires admin auth)
GET /admin/health Admin health diagnostics
GET /admin/providers Provider status
GET /admin/costs Cost aggregation
GET /admin/mcp/servers MCP server registry
POST /admin/config/reload Hot-reload configuration
GET /admin/users User management
Auth
POST /auth/register Register user
POST /auth/login Login (returns JWT)
POST /auth/refresh Refresh token
GET /auth/github GitHub OAuth2 flow start
GET /auth/github/callback GitHub OAuth2 callback
Additional
POST /v1/orchestrate DAG orchestration
POST /v1/templates Prompt templates (CRUD)
POST /v1/documents Document upload (RAG pipeline)
POST /v1/documents/search RAG search
POST /api/workflows/:name/execute Execute workflow
GET /api/ws/workflow WebSocket workflow events
GET /chat Embedded Chat UI SPA
GET /workflow Embedded Workflow Builder SPA
POST /mesh/announce Federated mesh peer announce
Project Structure
main.go Entry point (port 7340, .env loading, graceful shutdown)
go.work Workspace root (19 modules)
Makefile build, test, lint, docker, SPA embedding
gateway-config.yaml Runtime config (feature flags, MCP, routing)
.env.example All environment variables documented
├── shared/ Cross-cutting types (stdlib only)
├── events/ SSE event catalog
├── provider/ Model provider plugin system (gRPC + protobuf)
│ └── pb/ Generated protobuf code
├── tools/ Tool registry and execution (33 tools)
├── memory/ Semantic memory with compression
├── mcp/ MCP host (stdio + SSE + streamable_http)
├── orchestration/ DAG planning and execution engine
├── disposition/ ADA personality system
├── skill/ Tiered skill executor (89 skills)
├── apps/ MCP Apps host
├── workflow/ Durable workflow engine
├── workflow-builder/ Svelte 5 SPA (workflow canvas UI)
├── chat-ui/ Svelte 5 SPA (chat interface)
├── runtime/
│ ├── actor/ Actor supervision tree
│ ├── cas/ Content-addressable storage
│ ├── d1client/ Cloudflare D1 edge sync
│ ├── event/ Event bus and routing
│ └── wasm/ WASM sandbox
├── wasm-modules/
│ └── dip-scorer/ DIP scoring (compiled to WASM)
├── server/ HTTP server, handlers, middleware, auth, streaming
│ ├── agent/ Primary agent logic
│ ├── config/ Configuration loading (YAML + env)
│ ├── database/ SQLite adapter (local + cloud)
│ ├── handlers/ Handler structs (chat, memory, models, SSE, etc.)
│ ├── middleware/ Auth, CORS, rate limiting
│ ├── migrations/ SQL migration files
│ ├── services/ Provider registry, routing, cost tracking, budget
│ │ └── providers/ Per-provider adapters (8 providers)
│ ├── streaming/ SSE streaming infrastructure
│ └── trace/ OTEL trace integration
├── specialist/ Specialist agent modules
├── integration/ Integration test harness
├── cmd/dojo/ CLI integration module
├── edge/ Cloudflare edge components
├── workers/ Cloudflare Workers
├── deploy/ VPS deployment (Caddy, systemd, provisioning)
├── deployments/ Docker/OTEL configs
├── commissions/ Pipeline commission definitions
├── contracts/ Interface contracts
├── scripts/ Utilities (drift check, skill validation, module rename)
├── docs/ Architecture docs, specs, guides
└── plugins/ Provider plugin binaries
Key Commands
make build # Build binary to bin/agentic-gateway
make test # Run all tests with race detector
make test-cover # Tests + coverage report (HTML)
make lint # golangci-lint
make docker # Build Docker image
make build-spa # Build Workflow Builder SPA (embed into binary)
make build-chat-spa # Build Chat UI SPA (embed into binary)
make docker-compose-up # Full stack: gateway + OTEL collector + Langfuse + Postgres
make clean # Remove build artifacts
Configuration
Environment Variables
Copy .env.example to .env and set your provider API keys. The gateway loads .env on startup; existing environment variables take precedence.
YAML Config
gateway-config.yaml controls runtime behavior:
features:
tool_calling: true # Agentic tool-calling loop
get_document_tool: true # Document fetch endpoint
patch_intent: true # Extract patch intents from responses
provider_key_management: true # Accept API keys via settings endpoint
ollama_tool_fallback: true # Text-mode fallback for Ollama
Port
Default port is 7340. Override with PORT environment variable.
The Dojo CLI connects to the gateway at localhost:7340 by default. Set DOJO_GATEWAY_URL to point elsewhere.
CORS
Set ALLOWED_ORIGINS to a comma-separated list of allowed origins (each must include scheme):
ALLOWED_ORIGINS=http://localhost:3000,https://app.example.com
Observability
The gateway supports OpenTelemetry trace export and Langfuse integration:
OTEL_ENABLED=true
OTEL_EXPORTER_OTLP_ENDPOINT=otel-collector:4317
OTEL_SERVICE_NAME=agentic-gateway
Use docker-compose.example.yml for a full observability stack (OTEL Collector + Langfuse + PostgreSQL).
Deployment
Docker (recommended for production)
docker build -t agentic-gateway .
docker run -p 7340:7340 --env-file .env agentic-gateway
The Dockerfile uses a multi-stage build: Go 1.25 Alpine builder with CGO disabled (pure-Go SQLite via modernc.org/sqlite), distroless runtime image, runs as non-root (UID 65534).
VPS
See deploy/ for production deployment files:
Caddyfile-- reverse proxy with automatic TLSgateway.service-- systemd unit fileprovision.sh-- server provisioning script
Live deployment: gateway.trespies.dev (Hetzner CPX21, Caddy TLS, 4 providers active).
Docker Compose (full stack)
docker compose -f docker-compose.example.yml up -d
Starts: gateway + OTEL Collector + Langfuse + PostgreSQL.
Requirements
- Go 1.25+ (uses Go workspace with
go.work) - Node.js 18+ (for building embedded SPAs, optional if using pre-built binary)
- C compiler not required (pure-Go SQLite via
modernc.org/sqlite, CGO_ENABLED=0)
Using with the Dojo CLI
The gateway is the backend for the Dojo CLI. Install via Homebrew and point it at a running gateway:
brew install DojoGenesis/tap/dojo
export DOJO_GATEWAY_URL=http://localhost:7340
dojo chat
License
Apache-2.0 -- see LICENSE for details.
Agentic Gateway MCP questions
What LLM providers are supported?
The gateway supports Anthropic, OpenAI, Google Gemini, Groq, Mistral, DeepSeek, Kimi, and Ollama.
Does it support MCP?
Yes, it includes MCP host integration via stdio, SSE, and streamable_http transports, as well as MCP Apps host infrastructure.