πŸš€ MCP Server for Dynamic Tool Creation

Let Your AI
Build Its Own Tools

Skillz is a self-extending MCP server. Create WASM tools from Rust or register scripts in any languageβ€”Python, Node.js, Ruby, Bashβ€”at runtime. Now with automatic dependency management.

⚑ Quick Install

Get started in seconds

πŸ¦€ Install with Cargo (Rust)
# Install WASM target
rustup target add wasm32-wasip1

# Install Skillz
cargo install skillz

⚠️ Important: Make sure ~/.cargo/bin is in your PATH so your editor can find the executable.

Works with your favorite editor

πŸ–±οΈ Cursor πŸ€– Claude Desktop πŸ’» VS Code πŸ„ Windsurf ⚑ Zed

πŸ—οΈ Architecture & Flows

Understanding how Skillz connects all the pieces

Skillz Architecture Diagram

πŸ“Š Key Flows Explained

πŸ”¨ 1. Building & Registering Tools

WASM Tools: AI sends Rust code β†’ Skillz compiles to WebAssembly β†’ Tool registered in Tool Registry β†’ Available immediately

Script Tools: AI sends Python/Node.js code β†’ Skillz creates tool directory with dependencies β†’ Registers in Tool Registry β†’ Ready to execute

Pipelines: AI defines tool chain β†’ Skillz creates pipeline tool β†’ Automatically handles variable substitution β†’ Executes tools in sequence

⚑ 2. Tool Execution Flow

Request: MCP Client calls tool β†’ Skillz validates & prepares context β†’ Runtime Engine executes

WASM: Loaded in WASI sandbox β†’ Direct memory access β†’ Fast execution β†’ Returns result

Script: Process spawned β†’ JSON-RPC over stdin/stdout β†’ Can call back to server β†’ Returns result

Response: Result formatted β†’ Progress/logs included β†’ Sent to MCP client

πŸ”— 3. Script Tool Capabilities (Bidirectional)

Memory API: Script sends memory/set β†’ Server stores in libSQL β†’ Script sends memory/get β†’ Server retrieves β†’ TTL support

Resources API: Script sends resources/list β†’ Server returns available resources β†’ Script sends resources/read β†’ Server returns content

Elicitation: Script needs user input β†’ Sends elicitation/create β†’ Server forwards to MCP client β†’ User responds β†’ Script receives answer

Sampling: Script needs LLM completion β†’ Sends sampling/createMessage β†’ Server forwards to MCP client β†’ LLM responds β†’ Script receives completion

Tool Calling: Script can call other Skillz tools β†’ Sends tools/call β†’ Server executes target tool β†’ Returns result to caller

πŸ”₯ 4. Hot Reload Flow (--hot-reload)

Watch: File watcher monitors tools directory β†’ Detects changes to tool files

Reload: Tool removed from registry β†’ Reloaded from disk β†’ Re-registered

Notify: MCP notification sent to clients β†’ tools/list_changed β†’ resources/updated for subscribed tools

Zero Downtime: Other tools continue working β†’ No server restart needed

πŸ“¦ 5. Versioning & Rollback Flow

Auto-Backup: Tool updated β†’ Current version backed up to .versions/ β†’ Timestamp added

List Versions: Use version tool with action: "list" β†’ Returns all versions with timestamps

Rollback: Use version tool with action: "rollback" β†’ Restores selected version β†’ Current becomes backup

History: All versions preserved β†’ Can rollback multiple times β†’ Full version audit trail

🌐 6. HTTP/SSE Transport (--transport http)

HTTP Server: Skillz starts HTTP server β†’ Accepts connections from web clients

SSE Stream: Client connects to /sse β†’ Server sends events β†’ Real-time notifications

Message Endpoint: Client posts JSON-RPC to /message β†’ Server processes β†’ Response sent via SSE

Multiple Clients: Each client gets own SSE connection β†’ Isolated sessions β†’ Concurrent execution

🐳 7. Docker Services & Pipelines

Service Definition: Use services tool to define containers (Postgres, Redis, etc.) β†’ Skillz manages lifecycle

Auto-Injection: Connection strings automatically injected as env vars into Tools β†’ Seamless integration

Pipelines: Chain multiple tools together β†’ Tool A output becomes Tool B input β†’ Complex workflows

Full Stack: Build complete applications: DB Service + Backend Tool + Frontend Tool β†’ All managed by Skillz

πŸ”§ Configuration

CLI options and environment variables

πŸ”₯

--hot-reload

Watch tools directory for changes and auto-reload.
skillz --hot-reload

🌍

--transport http

Run as HTTP server with SSE for web apps.
skillz --transport http --port 8080

πŸ“‚

SKILLZ_ROOTS

Colon-separated list of allowed workspace roots.
/home/user/project:/data

πŸ”’

SKILLZ_SANDBOX

Isolation mode for script tools (Linux only).
bubblewrap | firejail | nsjail

Powerful Features

Everything you need to build dynamic AI tools

πŸ¦€

WASM Tools (Rust)

Compile Rust code to WebAssembly at runtime. Tools run in a secure sandbox with memory isolation and near-native performance.

πŸ“œ

Script Tools (Any Language)

Register tools in Python, Node.js, Ruby, Bash, Perl, PHP, or any language. Scripts communicate via JSON-RPC 2.0 protocol.

πŸ“¦

Dependency Management

Automatic pip/npm dependency installation. Each tool gets its own isolated virtual environment that persists across restarts.

⛓️

Pipeline Tools

Chain tools together declaratively with variable resolution ($input, $prev, $step_name).

πŸ“‘

Full MCP Protocol

Resources, roots, logging, progress updates, elicitation, and sampling support. Complete MCP compatibility.

πŸ’Ύ

Persistent Tools

Tools, dependencies, and environments persist across restarts. Build your AI's toolbox over time.

πŸ”’

Secure Sandbox

WASM tools run in isolated WebAssembly environment. Optional bubblewrap/firejail isolation for scripts.

🏷️

Tool Annotations

Mark tools with hints: readOnlyHint, destructiveHint, idempotentHint. Helps AI understand tool behavior.

⚑

Code Execution Mode

Compose multiple tools via Python/JS code. Reduces token usage by 98% (150k β†’ 2k tokens)!

πŸ’¬

Elicitation & Memory

Scripts can request user input via MCP elicitation and use persistent storage for state.

πŸ“–

Dynamic Guide

Built-in skillz://guide resource that automatically updates when new tools are added.

🌐

Tool Import

Import tools from GitHub repos or Gists. Share your tools with the community!

πŸ”Œ

MCP Integration

Import external stdio MCP servers. Tools exposed under namespaces, work in pipelines!

πŸ’‘

Built-in Prompts

6 native prompts to help create tools: create_wasm_tool, create_python_tool, create_pipeline, and more!

πŸ”₯

Hot Reload

Watch tools directory for changes. Auto-reload modified tools without server restart!

🐳

Docker Services

Define Docker services (databases, caches) that tools depend on. Auto-inject connection env vars!

πŸ› οΈ Available Tools

Built-in tools for creating and managing your AI toolkit

Tool Description Type
build_tool Compile Rust code β†’ WASM tool with crate dependencies. Core
register_script Register script tool (Python, Node.js, etc.) with dependencies. Core
call_tool Execute any registered tool (WASM, Script, Pipeline, or MCP). Core
list_tools List all available tools grouped by type. Core
delete_tool Delete a tool and clean up its files. Core
import_tool Import tools from Git repos or GitHub Gists. Core
import_mcp Register external stdio MCP servers under a namespace. New
execute_code Run Python/JS code that composes multiple tools. 98% token savings! Core
pipeline Create, list, delete pipeline tools (action: create|list|delete). New
memory Persistent storage for tools (action: store|get|list|delete|stats). New
services Define & manage Docker services for tools (action: define|start|stop|list|status). New

Simple to Use

Create tools with just a few lines of code

πŸ¦€ Rust WASM Tool
// Build a Fibonacci generator
build_tool(
  name: "fibonacci",
  code: "fn main() {
    let mut a = 0u64;
    let mut b = 1;
    for _ in 0..20 {
        print!(\"{} \", a);
        let t = a + b;
        a = b;
        b = t;
    }
}",
  description: "Generates Fibonacci numbers"
)

Architecture

Clean, modular design

Skillz Architecture Diagram

πŸ“Š How Skillz Works

Visual overview of the tool creation and execution flow

Tool Types & Execution Flow

MCP Server Skillz Runtime πŸ¦€ WASM Tools Rust + Dependencies WebAssembly βœ“ Sandboxed πŸ“œ Script Tools Python, Node.js, etc. JSON-RPC 2.0 βœ“ Isolated Env AI Editor / Client compile register execute

Tool Creation Lifecycle

1. Design Define inputs, outputs, schema πŸ“‹ 2. Implement Write Rust or Script code πŸ’» 3. Test Validate & compile check πŸ§ͺ 4. Finalize Register & persist tool βœ…

How It Works

From code to execution in seconds

1

Write Code

AI writes Rust code for WASM tools or scripts in any language (Python, Node.js, etc.). Specify dependencies if needed.

2

Compile & Register

WASM tools are compiled using cargo. Scripts are saved with appropriate interpreter. Dependencies are installed in isolated environments.

3

Execute

WASM runs in Wasmtime sandbox. Scripts execute via subprocess with JSON-RPC 2.0 protocol using their virtual environment.

4

Persist

Tools, dependencies, and environments are stored on disk. Available across server restarts. Build your AI's toolbox over time.

β˜• Support Skillz Development

Help keep this project growing! Your support enables new features and improvements.

Buy Me a Coffee