Skip to main content
Glama

Cooperage gives an LLM a fully observable sandbox with a registry of AI-ready tools, each running in its own isolated container with dedicated CPU/memory and a shared workspace volume.

The problem

Most AI tool infrastructure assumes tools are REST APIs. But the tools that actually matter at companies with big systems engineering — simulation engines, data pipelines, sensor processors, analysis libraries — are heavyweight compute systems. They can't be stateless. They can't live behind an HTTP endpoint.

Cooperage is built for those tools.

Every company with serious systems engineering has institutional knowledge locked inside heavyweight compute tools. Cooperage connects them and lets AI orchestrate across all of them.

Related MCP server: Docker MCP Server

How it works

The LLM orchestrates tools across isolated containers. Data flows through a shared /workspace volume, not context windows. Each tool gets its own container with dedicated resources, spun up on demand.

The key idea: multiple containers per session, one shared /workspace volume. A generator writes a file, an analyzer reads it, a report writer summarizes it — all orchestrated by the LLM, all passing data through the same volume.

Quick start

Prerequisites: Python 3.11+, uv

git clone https://github.com/cooperage-io/cooperage.git && cd cooperage
uv sync

Register a tool

Option A — Docker image (full control):

docker buildx build --load -t my-analyzer:latest my-server/
uv run cooperage register \
  --name my-analyzer \
  --image my-analyzer:latest \
  --description "Analyze data in /workspace"

Option B — Wrap an existing API (no Docker needed):

# weather-api.yaml
name: weather
type: rest-api
base_url: https://api.weather.com/v1
auth:
  type: bearer
  token: ${WEATHER_API_KEY}
tools:
  - name: get_forecast
    description: Get weather forecast
    method: GET
    path: /forecast
    params:
      latitude: {type: number, description: "Latitude"}
      longitude: {type: number, description: "Longitude"}
uv run cooperage register --from weather-api.yaml --env WEATHER_API_KEY=sk-xxx

Option C — Wrap LangChain tools:

# my-tools.yaml
name: my-tools
type: langchain
source: /workspace/tools.py
uv run cooperage register --from my-tools.yaml

Connect to Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "cooperage": {
      "command": "/Users/YOU/.local/bin/uv",
      "args": ["--directory", "/path/to/cooperage", "run", "--no-active", "cooperage", "start"]
    }
  }
}

Restart Claude Desktop. The hammer icon appears — Cooperage is connected.

HTTP mode

uv run cooperage start --sse

Starts the gateway on http://localhost:8080/mcp.

Remote gateway (cloud deployment)

uv run cooperage start --proxy http://your-server:8080/mcp --api-key sk-your-key

Bridges your local Claude Desktop to a remote gateway over HTTP.

What the LLM can do

Tool

Purpose

cooperage_list_servers

Discover available tools

cooperage_create_session

Start a workspace session

cooperage_call_tool

Call a tool on any server

cooperage_list_tools

See what a server offers

cooperage_workspace_read/write/list

Read and write files in the shared workspace

cooperage_run_script

Execute Python with numpy/pandas/scipy

cooperage_run_bash

Execute shell commands

cooperage_get_container_logs

View a container's stdout/stderr

cooperage_set_session_expiry

Extend a session (up to 72 hours)

cooperage_end_session

Tear down and clean up

Multi-tool pipelines

This is the core use case. Containers share /workspace:

1. cooperage_call_tool(session, "web-scraper", "scrape_table",
     {url: "https://example.com/data", output: "sales.csv"})
     → fetches HTML table, saves /workspace/sales.csv

2. cooperage_call_tool(session, "csv-analyzer", "analyze_csv", {path: "sales.csv"})
     → reads sales.csv, returns statistics

3. cooperage_call_tool(session, "csv-analyzer", "plot_column",
     {path: "sales.csv", column: "revenue", chart_type: "bar", output: "chart.png"})
     → generates /workspace/chart.png

4. cooperage_call_tool(session, "pdf-report", "generate_report", {
     title: "Sales Analysis",
     sections: [
       {heading: "Data", file: "sales.csv"},
       {heading: "Revenue by Region", file: "chart.png"},
     ],
     output: "report.pdf"
   })
     → compiles /workspace/report.pdf

Three containers. One session. One shared volume. Data flows through files, not context windows.

Writing your own server

Use the cooperage-sdk (pip install cooperage-sdk). It handles workspace path resolution, MCP boilerplate, and server startup. You can build a full Docker image for maximum control, or write plain Python functions and skip the Dockerfile entirely — the SDK wraps them automatically.

Example servers:

Server

Industry

Tools

csv-analyzer

General

Statistics, charts, CSV comparison

web-scraper

General

URL text extraction, HTML table → CSV

pdf-report

General

Compile workspace files into PDF reports

sequence-analyzer

Biotech

FASTA parsing, GC content, motif search, composition charts

finance-toolkit

Finance

Portfolio analysis, risk metrics, correlation matrix

log-analyzer

DevOps

Log parsing, error grouping, anomaly detection, incident timeline

image-analyzer

Imaging

Image analysis with numpy/PIL

synthetic-image-generator

Imaging

Generate test imagery

Wrapping existing tools

Don't want to write a Docker image? Use cooperage register --from with a YAML config:

Type

What you provide

What happens

rest-api

Base URL, auth, tool definitions

HTTP calls proxied to your API (no container)

langchain

Python file or pip package with @tool functions

Auto-discovered and wrapped

Auth credentials use ${ENV_VAR} syntax — secrets are passed via --env, never stored in config files.

Kubernetes

Drop-in backend. Same tools, same config — containers run as Pods.

COOPERAGE_ORCHESTRATOR=kubernetes uv run cooperage init-k8s
COOPERAGE_ORCHESTRATOR=kubernetes uv run cooperage start

Web UI

Real-time dashboard for monitoring sessions, viewing container logs, and browsing workspace files. Supports file upload and download — bring your own data in, pull results out. Cooperage gives the LLM a URL to share with the user when a session starts.

Enterprise

cooperage-enterprise adds auth, multi-tenancy, RBAC, session quotas, and audit logging on top of the open-source core (BSL License).

  • Authentication — API keys, JWT (HS256), OIDC/SSO (Azure AD, Okta, Auth0)

  • Multi-tenancy — per-tenant session isolation and RBAC

  • Session quotas — max_sessions per tenant

  • Audit logging — JSON-lines event log for every tool call

The open-source core includes:

  • Per-container CPU and memory limits

  • Per-session network isolation

  • Private image registry auth

  • Container idle timeout and session TTL management

Configuration

All settings use the COOPERAGE_ prefix. Can go in .env.

Variable

Default

Description

COOPERAGE_ORCHESTRATOR

docker

docker or kubernetes

COOPERAGE_SESSION_TTL_SECONDS

1800

Session auto-expiry (30 min)

COOPERAGE_CONTAINER_IDLE_TIMEOUT

600

Stop idle containers (10 min)

COOPERAGE_CONTAINER_STARTUP_TIMEOUT

120

Readiness probe timeout

COOPERAGE_DEFAULT_CPU_LIMIT

1.0

CPU limit per container

COOPERAGE_DEFAULT_MEMORY_LIMIT

512m

Memory limit per container

COOPERAGE_NETWORK_ISOLATION

true

Per-session Docker networks

COOPERAGE_UI_URL

—

UI URL shown after session creation

CLI

cooperage register       Register a tool (Docker image or --from config)
cooperage deregister     Remove a tool
cooperage list-servers   List registered tools
cooperage sessions       List active sessions
cooperage start          Start the gateway (stdio, --sse, or --proxy)
cooperage init-k8s       Bootstrap Kubernetes namespace
cooperage ui             Launch the web dashboard
cooperage clear          Stop all containers and reset state

Tests

uv run pytest -v

License

Public core: MIT. Enterprise: BSL License

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