Categories
Self-Hosted AI Agents Python MCP Gateway Agent Tooling Token Optimization Code Execution Agent SecurityDeveloper links
ToolKernel
ToolKernel hands an AI agent a Python notebook wired to every MCP server you use, so big tool results stay in variables and the model reads only what it printed. Connect servers with the same mcp.json format as Claude Desktop and each tool becomes a typed function with keyword arguments and a docstring. The agent sees just seven small meta-tools and searches for a signature only when it needs one. Code runs in a persistent runtime per session, so variables stay in memory between calls, like cells in a notebook. An output guard keeps every result within a budget, turns large values into previews with shape and samples, and saves overflow for paging. Policies allow, deny, rate-limit, or hold a call until a person approves it in the web UI, and credentials never enter the runtime. The web UI records every step beside what the model saw and what stayed in the sandbox, with pages for servers, tools, a playground, approvals, and benchmarks. Claude Code and Cursor connect over MCP, stdio-only clients use a shim, and any other model can call a REST API with OpenAI or Anthropic tool formats. In the bundled benchmark, agents answered 20 of 21 data questions correctly, against 8 of 21 with tools wired in directly. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. Apache-2.0 licensed.
Benefits
- Big results never fill context
- Tool results land in Python variables, so a 24,000-row table stays in the runtime and the model reads a short printed summary, about a tenth of the input tokens.
- One small tool surface
- Seven meta-tools of roughly one thousand tokens stand in front of every connected server, and agents look up a signature only when they need it.
- Risky calls wait for approval
- Rules allow, deny, or rate-limit tools by pattern, and calls marked destructive can be held until someone approves them in the web UI.
- See what the model saw
- The web UI shows each step's code, the bytes the model received, and the megabytes that stayed in the sandbox, so every run can be audited.
Features
- Typed Python tool packages
- Every MCP tool becomes a Python function with type hints, a docstring, and a return type built from its JSON Schema, with a static check for bad imports.
- Local or Docker runtimes
- Each session runs in a local process or a hardened container with a read-only filesystem, dropped capabilities, resource limits, an isolated network, and optional gVisor.
- Output guard and paging
- A character budget, shape-and-sample previews, saved overflow, a read_output pager, and state and meta lines keep results small and show what stays in memory.
- MCP, REST, and stdio access
- One MCP server at /mcp, a REST API at /v1 with OpenAI and Anthropic tool formats, and a stdio shim for Claude Desktop reach any client.
- YAML policies and secrets
- Rules match tools by pattern with allow, deny, approve, or rate-limit actions, secrets resolve from environment variables or a file, and a bearer API key can protect endpoints.
- Rerunnable benchmark harness
- A bundled harness replays 16 tasks on generated company data across Anthropic, OpenAI, and DeepSeek models, scoring answers automatically with pandas and no model judge.