Skip to content
tekikaitoPublic

About

offline-first, single-binary MCP runtime manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

forge

The offline-first MCP runtime manager.

Forge installs MCP servers in isolated runtimes, manages their secrets, and exposes a single local gateway endpoint to your AI clients — no cloud required.

forge search postgres          # discover servers
forge add postgres             # install locally
forge up                       # start the gateway

Then point Claude Desktop (or any MCP client) at one endpoint and get all your servers at once.


Why forge?

Most MCP tooling assumes a cloud gateway or requires you to manually wire up each server in every AI client config. Forge takes a different approach:

Forge Cloud gateways
Runs on your machine ✓ ✗
Works offline ✓ ✗
Isolated runtimes (venv, npm) ✓ ✗
Single binary, no runtime dep ✓ ✗
Registry discovery ✓ (Smithery) ✓

Forge uses the Smithery registry for discovery, then installs and runs everything locally.


Install

From source

git clone https://github.com/tekikaito/forge
cd forge
go build -o forge .
sudo mv forge /usr/local/bin/

Requires Go 1.22+


Quickstart

1. Find a server

forge search postgres
forge search filesystem --local   # only locally-runnable servers

2. Install it

forge add HenkDz/postgresql-mcp-server
# or from a Git URL:
forge add https://github.com/example/mcp-server

3. Add secrets (if needed)

forge secret set DATABASE_URL "postgres://localhost/mydb"

4. Start the gateway

forge up

5. Connect your AI client

Add this to your Claude Desktop / Cursor MCP config:

{
  "mcpServers": {
    "forge": {
      "command": "forge",
      "args": ["up", "--foreground"]
    }
  }
}

That's it. All servers managed by forge are now available through a single endpoint.


Commands

forge search <query>              Search the Smithery registry
forge search <query> --local      Filter to locally-runnable servers only

forge add <name>                  Install a server by Smithery name
forge add <github-url>            Install from a Git repository
forge add <name> --name <alias>   Install with a custom local name

forge list                        Show all configured servers

forge enable <name>               Enable a configured server
forge disable <name>              Disable a server (keeps config, won't start)

forge up                          Start the gateway as a background daemon
forge up --foreground             Run in the foreground (use this in MCP config)
forge stop                        Stop the background daemon

forge remove <name>               Remove a server from forge
forge remove <name> --purge       Also delete the install directory

forge secret set <KEY> <VALUE>    Store a secret
forge secret list                 List stored secret keys
forge secret delete <KEY>         Delete a secret

How it works

Claude Desktop
     │  MCP (stdio)
     ▼
┌─────────────┐
│   forge     │  ← single gateway process
│  (gateway)  │
└──┬──┬──┬───┘
   │  │  │  routes tool calls to owning child
   ▼  ▼  ▼
[postgres] [slack] [filesystem]  ← isolated child processes

When you run forge up --foreground, forge:

  1. Reads ~/.config/forge/config.yaml
  2. Starts each enabled server as a child process with its isolated env
  3. Performs the MCP handshake with each child and collects their tools
  4. Exposes a single MCP endpoint on stdio
  5. Routes tools/call requests to whichever child owns that tool

Child servers run concurrently — multiple in-flight tool calls are handled in parallel.


Runtimes

Runtime Isolation Install method
Node.js per-server npm prefix git clone + npm install
Python per-server virtualenv git clone + python -m venv + pip install
npx npm cache npx -y <package> (no clone needed)

Configuration

Config lives at ~/.config/forge/config.yaml:

# Global isolation default (auto | native | bwrap | none)
isolation:
  mode: auto

servers:
  - name: postgres
    source: smithery:HenkDz/postgresql-mcp-server
    runtime: node
    command: node
    args: [/home/user/.config/forge/servers/postgres/dist/index.js]
    env:
      LOG_LEVEL: info
    secrets:
      - DATABASE_URL # injected from forge secrets at runtime
    install_path: /home/user/.config/forge/servers/postgres
    enabled: true
    context: available          # pinned | available | lazy
    isolation: auto             # override per-server; inherits global if omitted
    isolate_network: false      # true = apply CLONE_NEWNET (no outbound connections)

Secrets are stored separately at ~/.config/forge/secrets.yaml (mode 0600) and injected as environment variables at startup — they never appear in the main config file.

Isolation backends

Backend How Requires
auto Picks best available (bwrap → native → none) —
native Linux namespaces + Landlock + seccomp-bpf Linux 5.13+
bwrap Bubblewrap wrapper apt install bubblewrap
none No isolation (debug only) —

The native backend applies:

  • PID namespace — child cannot enumerate host processes
  • IPC / UTS namespaces — isolated IPC and hostname
  • User namespace — runs with your UID, no privileges
  • Landlock — filesystem access restricted to system libs + server install path + caches
  • seccomp deny-list — ptrace, mount, reboot, kexec, bpf and other dangerous syscalls blocked

Roadmap

  • CLI engine — add, remove, list, up, stop, secret
  • Smithery registry integration — forge search, forge add <name>
  • Isolated Node.js and Python runtimes
  • Unified MCP gateway with concurrent request routing
  • forge enable / forge disable — toggle servers without editing YAML
  • Process isolation — pluggable backends: native Linux (namespaces+Landlock+seccomp) and bubblewrap
  • Menubar app (macOS / Linux / Windows)
  • Permissions system — per-server network and filesystem access controls

License

MIT

About

offline-first, single-binary MCP runtime manager

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages