← Back to Home
πŸ“ Blog Post β€’ November 2025

I Built an MCP Server That Lets AI Create Its Own Tools β€” Here's What Happened

How Anthropic's MCP announcement inspired me to build a self-extending AI development platform with 27+ features

The Spark: Code Execution & Agent Skills

Two recent posts from Anthropic completely changed how I think about AI agents.

First, their engineering deep dive on Code execution with MCP articulated a problem I'd been seeing everywhere:

"As the number of connected tools grows, loading all tool definitions upfront and passing intermediate results through the context window slows down agents... Code execution enables agents to interact with MCP servers more efficiently, handling more tools while using fewer tokens."

They showed how letting agents write code to call tools could reduce token usage by 98%.

Then came Agent Skills, which introduced the idea of "packaging expertise" into folders that Claude loads on demand.

Putting these together triggered an "Aha!" moment:

If agents can write code to call tools (for efficiency) and load skills (for expertise), why can't they write code to create new tools?

Why stop at efficient execution? Why not let the agent build its own toolkit on the fly? If it needs a better JSON parser, it shouldn't just run a script onceβ€”it should compile a high-performance WASM tool and register it for future use.

That question led me down a rabbit hole that resulted in Skillz β€” an MCP server that implements Anthropic's code execution vision and extends it into a self-improving tool factory.


The Problem: Static Tools in a Dynamic World

If you've worked with Claude, Cursor, or any MCP-compatible AI assistant, you know the drill:

  1. ❌ Write server code with a new tool
  2. ❌ Deploy and restart
  3. ❌ Restart your editor to pick up changes
  4. ❌ Repeat for every. single. tool.

It's like having a brilliant assistant but making them fill out requisition forms every time they need a pencil.

What if AI could just... make the pencil?


Enter Skillz: Self-Extending AI

Skillz flips the script. Instead of pre-defining tools, you give AI the ability to create them at runtime:

"Build me a tool that fetches weather data"
β†’ AI writes the code
β†’ Skillz compiles it to WASM
β†’ Tool is instantly available

No deployments. No restarts. Zero downtime.

The tool persists across sessions, can be versioned, rolled back, shared, and even call other tools. It's tools all the way down.


The Technical Journey: 27 Features Later

What started as a "compile Rust to WASM" experiment evolved into a full-featured platform. Here's everything Skillz supports today:

πŸ¦€ Multi-Language Tool Creation

WASM Tools (Rust) β€” Safe, sandboxed, lightning-fast:

You: I need a really fast prime number generator for testing. Performance matters.

Claude: For maximum performance, I'll build this as a WASM tool in Rust. It'll run in a secure sandbox with near-native speed...

βœ… Created prime_generator β€” compiled to WebAssembly. Try: "Generate primes up to 10000"

Script Tools β€” Python, Node.js, Ruby, Bash, anything:

You: Can you make me an HTTP client that handles retries and timeouts nicely?

Claude: I'll create a Python tool with the requests and tenacity libraries for robust HTTP handling...

βœ… Created http_client with dependencies auto-installed in an isolated virtual environment.

Pipelines β€” Chain tools together:

You: I want to fetch a webpage, extract the main content, translate it to Spanish, and save it as a PDF. Can we do that in one command?

Claude: I'll create a pipeline that chains those tools together. Each step's output feeds into the next...

βœ… Created webpage_to_spanish_pdf pipeline. Just say "Process https://example.com" and it runs all four steps automatically.

πŸ“¦ First-Class Dependency Management

This was the game-changer:

You: I need to parse some complex JSON with validation and regex matching.

Claude: I'll create a WASM tool with serde, serde_json, and regex crates...

βœ… Created json_processor with Rust dependencies. Compiled to WebAssembly with all crates bundled.

You: Now I need a data analysis tool with pandas and numpy.

Claude: I'll build that as a Python tool with those dependencies...

βœ… Created data_analyzer. A virtual environment was created and pandas/numpy were installed automatically.

⚑ Code Execution Mode (The Token Saver)

Here's where it gets really powerful:

You: I need to check the weather in 10 cities, translate each forecast to the local language, and compile a report. But I don't want to wait for 30 separate tool calls.

Claude: I'll use code execution mode to do this efficiently. All your registered tools become callable functions in a single script...

βœ… Done! Processed all 10 cities in one execution. This used ~2,000 tokens instead of ~150,000 for sequential calls.

Result: 98% token savings, exactly as predicted in Anthropic's engineering blog.


All 27+ Features at a Glance

πŸ¦€ WASM Tools

Compile Rust β†’ WebAssembly at runtime with near-native performance

πŸ“œ Script Tools

Python, Node.js, Ruby, Bash, or any language with JSON-RPC 2.0

⛓️ Pipelines

Chain tools together declaratively with variable resolution

πŸ“¦ Dependencies

Rust crates, pip packages, npm modules β€” auto-installed

πŸ’Ύ Persistent Memory

SQLite-based key-value store with TTL support

πŸ’¬ Elicitation

Scripts can request user input mid-execution

🧠 Sampling

Scripts can request LLM completions

πŸ” Sandbox

bubblewrap, firejail, or nsjail isolation

πŸ”‘ Secrets

Forward SKILLZ_* env vars to tools

🌍 Import/Export

Import from GitHub repos and Gists

πŸ”₯ Hot Reload

Auto-reload on file changes, no restart

πŸ“¦ Versioning

Auto-backup and rollback to any version

🌐 HTTP Transport

Run as HTTP server with SSE

πŸ“‹ Annotations

readOnlyHint, destructiveHint, idempotentHint

πŸ”— Tools/Call

Tools can call other registered tools

πŸ“‘ Streaming

Progressive output via stream chunks

Plus: logging, progress updates, resource subscriptions, listChanged notifications, cancellation handling, _meta support, and more.


The Architecture

Skillz is ~7,400 lines of Rust, built on:

Skillz Architecture Flow

High-level architecture and data flow

The core insight was separating tool types (WASM, Script, Pipeline) from the execution layer, allowing each to be optimized independently while sharing a common registry and memory system.


Getting Started

Installation

# Add WASM target
rustup target add wasm32-wasip1

# Install from crates.io
cargo install skillz

⚠️ Note: Ensure ~/.cargo/bin is in your PATH so your editor can find the skillz executable.

Configuration (Cursor IDE)

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "skillz": {
      "command": "skillz"
    }
  }
}

The Philosophy

Skillz isn't just a technical project. It's a bet on a different future:

AI shouldn't be constrained by the tools we imagine today.

When Claude needs a tool that doesn't exist, it shouldn't wait for a developer. It should create it, test it, refine it, and share it.

This is what autonomous AI development looks like. Not replacing developers, but amplifying them. A thousand tools, born from conversation.

Anthropic gave us the protocol. I'm just exploring what happens when you let AI extend it.

Try Skillz Today

Let your AI build its own tools. No deployments. No restarts. Just ask.

πŸ‘¨β€πŸ’»
Algimantas Krasauskas
Building tools for AI-powered development