/ Directory / Playground / Nanobot
● Community HKUDS ⚡ Instant

Nanobot

by HKUDS · HKUDS/nanobot

If FastMCP and Upsonic feel heavy: Nanobot is a few hundred lines of Python that gives you a working personal agent with MCP support.

Nanobot is an academic-style minimal agent framework. Strips most abstraction; you bring tools and an LLM, it gives you the loop. Use it when you want a teachable, hackable baseline for an MCP-aware agent.

Why use it

Key features

Live Demo

What it looks like in practice

ready

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "nanobot-mcp": {
      "command": "uvx",
      "args": [
        "nanobot",
        "serve",
        "--mcp"
      ]
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "nanobot-mcp": {
      "command": "uvx",
      "args": [
        "nanobot",
        "serve",
        "--mcp"
      ]
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "nanobot-mcp": {
      "command": "uvx",
      "args": [
        "nanobot",
        "serve",
        "--mcp"
      ]
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "nanobot-mcp": {
      "command": "uvx",
      "args": [
        "nanobot",
        "serve",
        "--mcp"
      ]
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "nanobot-mcp",
      "command": "uvx",
      "args": [
        "nanobot",
        "serve",
        "--mcp"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "nanobot-mcp": {
      "command": {
        "path": "uvx",
        "args": [
          "nanobot",
          "serve",
          "--mcp"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add nanobot-mcp -- uvx nanobot serve --mcp

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use Nanobot

Learn the agent loop by reading the source

👤 Developers ⏱ ~15 min intermediate

When to use: You want to understand what FastMCP / Upsonic do under the hood.

Flow
  1. Read
    Open the main module — single-file core.✓ Copied
    → Mental model
  2. Run
    Start the bot; call its MCP tools from Claude.✓ Copied
    → Works
  3. Modify
    Add a tool or change the planner.✓ Copied
    → Fork ready

Outcome: Working hackable baseline for your own agent.

Combinations

Pair with other MCPs for X10 leverage

nanobot-mcp + fastmcp-prefect

Prototype with Nanobot; harden with FastMCP for production

Combine nanobot-mcp with fastmcp-prefect: Prototype with Nanobot; harden with FastMCP for production✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
run (see docs) Run a task through the nanobot loop 1 call

Cost & Limits

What this costs to run

API quota
Bound by LLM
Tokens per call
Normal
Monetary
Free OSS
Tip
Keep tool sets small — Nanobot is minimal, not magical

Security

Permissions, secrets, blast radius

Credential storage: LLM keys in env
Data egress: Configured provider

Troubleshooting

Common errors and fixes

Planner gets stuck

Add a step budget; minimal planners need explicit halts

Alternatives

Nanobot vs others

AlternativeWhen to use it insteadTradeoff
FastMCPProduction serverMore framework

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills

Continue exploring

Related tools and workflows

Choose another guide for your workflow, or explore a collection.

Explore more MCP guides

Figma MCP Server Guide

Bring design information and context from Figma files into an agent’s implementation workflow.

MCP

Explore more MCP guides

BrowserStack MCP

Discover and use BrowserStack testing capabilities for browser, mobile, accessibility, test management, and load-testing workflows.

MCP

Explore more MCP guides

Apache IoTDB MCP

Query Apache IoTDB time-series data using Tree Model or Table Model SQL and inspect the permission requirements for database actions.

MCP

Explore more MCP guides

SigNoz MCP

Query SigNoz logs, traces, metrics, alerts, dashboards, and service telemetry through its official MCP server.

MCP

Browse all topic collections → · See 29 new official additions →