Skip to content

Forge

Forge is a self-extending Claude Code agent that never says "I can't do that" — instead, it builds the capability on the spot.

Core trick

When a request lacks a tool, the agent generates a FastMCP server, validates it with an 11-check AST validator, and registers it.

Tags

Description

Forge is a self-extending Claude Code agent that never says "I can't do that" — instead, it builds the capability on the spot. When Forge encounters a request it can't handle, it autonomously designs, generates, validates, and registers a new MCP tool server, then uses it immediately to answer the original question. Every tool it builds is a real FastMCP server that persists forever, so the agent gets permanently smarter with every interaction. What sets it apart is rigor: every generated server passes through an 11-check AST-based validator before it goes live, and a built-in security policy prevents it from building anything dangerous. Forge uses five Claude Code platform features working together — Custom Agents, MCP Servers, Skills, Hooks, and Opus 4.6's extended thinking — to create an agent that doesn't just use tools, but manufactures them.
tomasmihalyi/claude-forge★ 63 forksPythonMITCreated Feb 12, 2026 · last push Feb 12, 2026

README excerpt

# Forge

**A Claude Code agent that builds its own tools.**

Forge detects when it lacks the capability to fulfill a request, then autonomously designs, builds, validates, and registers a new MCP tool server — and uses it immediately. Every tool it creates persists forever. The agent gets permanently smarter with every request.

```
User: "What time is it in Tokyo?"

Forge: I don't have a tool for this. Forging one now...
       [Designs world-clock server]
       [Generates servers/world-clock/server.py]
       [Validates: 11/11 checks passed]
       [Registers with Claude Code]
       [Uses it]

       The current time in Tokyo is 2:30 AM JST.
       Tool used: world-clock (forged just now)

User: "What time is it in London?"

Forge: I already have a tool for this: world-clock
       The current time in London is 5:30 PM GMT.
```

## Quick Start

```bash
# Clone and set up
git clone https://github.com/tomasmihalyi/claude-forge.git && cd claude-forge
uv sync

# Start the Forge agent
claude --agent forge
```

Then ask it anything:
- `"What time is it in Tokyo?"` — forges a timezone tool (stdlib)
- `"Analyze demo/sales.csv"` — forges a CSV analysis tool (stdlib)
- `"What's trending on Hacker News?"` — forges an HN API tool (httpx)
- `"What time is it in London?"` — reuses the timezone tool instantly

Check what's been forged: type `/forge-status` in the agent session.

## How It Works

### The Forge Protocol (9 steps)

```
User Request
    │
    ▼
1. CHECK REGISTRY ─── Match f

Team