minibot
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@minibot write a file hello.py that prints hello, then read it back"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
minibot
A locally-hosted bot for your terminal, powered by Ollama tool calling. Type natural language — the model picks tools, your bot eats, plays, recharges, and can read/write code files in a restricted sandbox.
Zero third-party dependencies: pure Python stdlib. Runs on Termux, Linux, macOS and Windows.
.---. Pixel the bot · mood: happy · age 3d
/ o o \ Hunger [██░░░░░░░░] 20/100
\ w / Happiness [███████░░░] 72/100
'---' Energy [██████░░░░] 65/100
Health [██████████] 100/100
❯ write a file hello.py that prints hello
» tools: write_file
Pixel: wrote hello.py (21 bytes), want me to run the idea past you?Requirements
Python 3.10+
Ollama running locally (or on another machine on your LAN)
Related MCP server: veriloop
Install Ollama
Platform | How |
Linux |
|
macOS |
|
Windows |
|
Termux |
|
Pull a tool-calling-capable model (7B recommended on desktops):
ollama pull qwen2.5:7b # or llama3.1:8b
# phones / weak CPUs:
ollama pull qwen2.5:3b
ollama pull qwen2.5:1.5bVerify: curl http://127.0.0.1:11434/api/tags should list your models.
Install minibot
git clone https://github.com/karun99/minibot.git && cd minibot
pip install . # installs the `minibot` command
# — or run without installing: python -m minibotNo pip install step needed beyond that — there are no runtime dependencies.
Quick start
minibot doctor # check python/config/sandbox/ollama/model
minibot run # interactive terminal botThen chat, or use direct commands (they work even with Ollama stopped):
/feed /play /rest /treat /status /stats
/ls /read notes.md /write notes.md /history /undo notes.md
/needle on /doctor /clear /help /quitCaring for the bot earns treats (feed and rest earn 1, play earns 2, capped
at 20); /treat spends one for a small happiness/health/energy boost.
/stats charts the recent stat history, /history lists recent sandbox
writes and /undo [file] reverts one.
Type minibot run --offline to start anyway when Ollama is down
(direct /commands only).
One-shot commands (scriptable)
minibot status # human readable
minibot status --json # machine readable
minibot feed # feed once
minibot treat # spend a treat
minibot stats --points 20 # recent stat chart (also --json)
minibot ls src/
minibot read src/app.py
echo "print('hi')" | minibot write hello.py
minibot history # recent sandbox writes
minibot undo src/app.py # restore the previous version
minibot chat "read hello.py and tell me what it does"Use it from any MCP client
minibot mcp serves the bot's tools over stdio using the
Model Context Protocol, so Claude Desktop,
Cursor, OpenCode or any other MCP client can feed your bot, read and write
sandbox files, and undo writes:
{
"mcpServers": {
"minibot": {
"command": "minibot",
"args": ["mcp"]
}
}
}Exposed tools: feed_bot, play_with_bot, rest_bot, give_treat,
get_bot_status, read_file, write_file, list_dir, file_history,
undo_write. The same sandbox rules apply — a client outside your machine
still cannot escape the sandbox directory.
Configuration
Search order: --config PATH → ./config.json →
$XDG_CONFIG_HOME/minibot/config.json → ~/.config/minibot/config.json →
defaults. Precedence: CLI flags > environment > config file > defaults.
Copy config.example.json to config.json and edit. Every key is optional:
Key | Default | Meaning |
|
| Ollama endpoint (also |
|
| model for the main loop (also |
|
| your bot's name |
|
| only directory file tools can touch (also |
|
| persisted bot state |
|
| rotating log (tool calls + file writes) |
|
| tool-loop cap per user message |
|
| read/write size limit (1 MB) |
|
| write journal backing |
|
| how many writes the journal keeps |
|
| intent pre-filter on/off |
|
|
|
| see example | stat drift per hour of real time |
MINIBOT_HOME (default ~/.minibot) overrides where state/sandbox/logs live.
The Needle pre-filter (optional)
When enabled, input is classified first into bot_action / file_action / chat / unknown:
heuristic mode — regex/keyword classifier, no model, instant, offline.
ollama mode — a tiny classifier model (
needle.model); any failure silently falls back to the heuristic, and any total failure falls back to the main loop (graceful degradation).Only high-confidence, unambiguous bot-care phrases ("feed my bot", "status") execute directly without the LLM; everything else — including vague or mixed requests — goes through the normal tool-calling loop.
Sandbox safety
All paths are resolved (symlinks followed) and must stay inside the sandbox.
..traversal, absolute paths outside the root, escaping symlinks and null bytes are rejected with a safe error.Read/write capped at
max_file_bytes(default 1 MB).Every write is logged with timestamp, path and size.
Tests
pip install pytest
pytest180+ tests: sandbox traversal attacks, state decay/persistence, treat inventory, stat-history samples, the write journal (history/undo), tool schemas, the ReAct loop (malformed-JSON retry, max iterations, history trimming), Needle routing, the Ollama client against a local fake server, the MCP server over stdio, and CLI acceptance tests.
Troubleshooting
Symptom | Fix |
|
|
|
|
Bot replies but never uses tools | use a tool-capable model ( |
Loop hits max iterations | ask for one thing at a time, or raise |
Colors/emoji look wrong |
|
Windows console garbled | Windows Terminal recommended (VT sequences auto-enabled) |
Layout
minibot/
config.py config file + env + CLI precedence
state.py bot stats, time decay, atomic JSON persistence
sandbox.py path containment, size limits, write audit
tools.py tool schemas + handlers (add a tool in ~10 lines)
ollama_client.py stdlib HTTP client for /api/chat and /api/tags
needle.py optional intent pre-filter (heuristic | ollama)
orchestrator.py ReAct loop, malformed-retry, history trimming
mcp_server.py stdio MCP server: expose the tools to other agents
tui.py terminal UI: sprite, bars, slash commands
cli.py run/status/feed/treat/stats/history/undo/chat/mcp/doctor
checks.py health checks shared by doctor and /doctor
docs/SRS.md the requirements this implements
tests/ pytest suite (run on a fast disk, not an SD card)License
MIT — see LICENSE.
Available Tools
10 toolsfeed_botA
Feed the bot Pixel. Reduces hunger (0 = full, 100 = starving), small happiness and health boost. Use when the user says the bot is hungry or asks to feed it.
Inputs: no named parameters.
file_historyA
List recent sandbox file writes (who wrote what, and when). Use before undoing a write you did not intend to make.
Inputs: limit.
get_bot_statusA
Return the bot's current stats (hunger/happiness/energy/health), mood and age in days.
Inputs: no named parameters.
give_treatA
Give Pixel a treat from the inventory. Costs one treat (earned by feeding, playing and resting); boosts happiness, health and energy a little.
Inputs: no named parameters.
list_dirA
List a directory inside the sandbox. 'path' defaults to the sandbox root; use it to browse files before reading or writing.
Inputs: path.
play_with_botA
Play with the bot. Raises happiness, costs energy, adds a little hunger. Fails if the bot is exhausted or sick.
Inputs: no named parameters.
read_fileA
Read a UTF-8 text file inside the sandbox directory. 'path' is relative to the sandbox root (e.g. 'notes/todo.md'). Absolute paths and '..' are rejected.
Inputs: path (required).
rest_botA
Let Pixel rest/recharge. Restores energy, small hunger cost. Use when the bot is tired.
Inputs: no named parameters.
undo_writeA
Undo a sandbox file write: restores the previous contents, or deletes the file if the write created it. Without 'path' undoes the most recent write.
Inputs: path.
write_fileA
Create or overwrite a UTF-8 text file inside the sandbox (e.g. write code). 'path' is relative to the sandbox root; absolute paths and '..' are rejected.
Inputs: path (required), content (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
The set splits into two clear clusters: bot-care tools and sandbox-file tools. Within each cluster the operations are distinct, though feed_bot and give_treat have overlapping effects and could occasionally be confused.
Most names are verb_noun, but conventions vary: feed_bot/play_with_bot/rest_bot use a bot suffix, file tools use read_file/write_file/list_dir, and file_history/undo_write break the pattern. Still readable, but not a single predictable scheme.
Ten tools is well-scoped for a small virtual-pet server with sandboxed file support. Each tool has a distinct role and the count does not feel bloated or thin.
Bot care covers feeding, playing, resting, status, and treats, but lacks inventory inspection or healing/medicine operations. File handling covers read, write, list, history, and undo, but misses explicit delete, move, copy, or search operations.
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Guard wraps stdio MCP servers: risky calls wait for a person; no answer, no run. Remote: cooperative
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceStdio MCP server for sandboxed file access — read files, search content, safely edit with checksums, and manage file structure.68 npmISC
- AlicenseAqualityDmaintenanceExposes a verified tool registry (calculator, sandboxed file read, web fetch) over MCP stdio, enabling any MCP-capable client to reuse the same tools from the inspectable ReAct loop.3MIT
- AlicenseNot gradedqualityBmaintenanceA small filesystem MCP server that reads and writes files under one confined root over stdio, with paginated tools and strict change-detection. It enables safe, deterministic file access for agentic runtimes and MCP clients.30 npmMIT
- AlicenseAqualityBmaintenanceEnables MCP-capable AI clients to control a local computer over stdio with filesystem operations, ripgrep search, shell command execution, and persistent process sessions.14MIT