BotOptimizer MCP server
Commit Nov 2, 2026Provides a shared, versioned memory vault for AI agent fleets to store project state, decisions, and handoff notes via local disk or Google Drive.
Also known as southline-tech/botoptimizer
- Stars
- 1
- Tools
- 16
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 2, 2026
- License
- Apache-2.0
What is BotOptimizer MCP?
BotOptimizer provides a shared, versioned memory vault for AI agent fleets to store project state, decisions, and handoff notes via local disk or Google Drive. It exposes 16 tools, such as brief, list, changed.
Summary generated from the project's README
About BotOptimizer MCP server
Providing a shared, versioned memory vault for AI agent fleets is what BotOptimizer enables. It allows multiple autonomous agents to maintain a consistent project state by storing decisions, specifications, handoff notes, and assignments in a centralized location. This prevents information loss when switching between different bots or sessions.
Developers can deploy this as a local service using stdio or via an HTTP connection requiring Bearer token authorization. While it defaults to local disk storage, it also supports Google Drive as a backend for shared access. The system is designed for attribution, using unique tokens to track which agent created or updated specific records.
Users manage the vault through a dedicated CLI or MCP tools like put, append, search, and get. It includes specialized features for tracking token usage and managing project access through an ACL system. Because vault notes are readable by the host or Drive, it is intended for project context rather than sensitive secrets.
What you can do with it
- 1Synchronizing agent handoffsAn AI agent can leave detailed instructions for the next agent in a sequence to ensure continuity.
- 2Maintaining project specificationsDevelopers can instruct agents to store and retrieve structured project requirements using specific kinds.
- 3Tracking token consumptionTeams can log real provider token counts to monitor the cost and efficiency of their agent fleets.
Written from the project's README. Every use case is checked against a quote from it.
BotOptimizer MCP tools 16
Detected from the READMEbrieflistchangedgetappendsearchhistorystatsusage_logusage_importusage_import_csvwatch_check
| brief | — | |
| list | — | |
| changed | — | |
| get | — | |
| append | — | |
| search | — | |
| history | — | |
| stats | — | |
| usage_log | — | |
| usage_import | — | |
| usage_import_csv | — | |
| watch_check | — |
Show all 16 toolsShow fewer tools
usage_chartusage_hintsreindexdelete
| usage_chart | — | |
| usage_hints | — | |
| reindex | — | |
| delete | — |
Configuration
BOTOPTIMIZER_BACKENDBOTOPTIMIZER_PROJECTBOTOPTIMIZER_TOKEN_FILE
| Name | Description | |
|---|---|---|
| BOTOPTIMIZER_BACKEND | — | |
| BOTOPTIMIZER_PROJECT | — | |
| BOTOPTIMIZER_TOKEN_FILE | — |
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablesouthline-tech/botoptimizer is public and reachablegithub.com/southline-tech/botoptimizer ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-02github.com/southline-tech/botoptimizer ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model16 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubBotOptimizer
BotOptimizer Memory — shared handoff notes for AI agent fleets (MCP HTTP or stdio), local disk by default, optional Google Drive. Not a secrets store.
Also see AGENTS.md (pasteable bot rules) · CONTRIBUTING.md · SECURITY.md
For agents
What / when
Use BotOptimizer Memory for shared, attributable project state across bots: decisions, specs, handoffs, assignments, and general notes. Do not store secrets. Local vault files are host-readable; Drive vault notes are folder-readable. Threat model: SECURITY.md.
Habits: list or search before get; append for logs; one structured put at end of turn; never paste tokens.
MCP connection (HTTP)
Streamable HTTP, POST only, path /mcp. Default: http://127.0.0.1:8787/mcp. Every request needs Authorization: Bearer <bot token>.
{
"mcpServers": {
"botoptimizer": {
"url": "http://127.0.0.1:8787/mcp",
"headers": { "Authorization": "Bearer ${BOTOPTIMIZER_TOKEN}" }
}
}
}
Protocol: JSON-RPC 2.0 — initialize, ping, tools/list, tools/call (no batch). Compact JSON results; list returns summaries only — call list before get.
MCP connection (stdio)
One child process per bot, each with its own token env (shared tokens break ACL attribution):
{
"mcpServers": {
"botoptimizer": {
"command": "/path/to/botoptimizer",
"args": ["stdio"],
"env": {
"BOTOPTIMIZER_TOKEN_FILE": "/secure/bot.token",
"BOTOPTIMIZER_PROJECT": "demo",
"BOTOPTIMIZER_BACKEND": "local"
}
}
}
}
Bot CLI
First-class commands: projects, list, brief, changed, get, put, append, search, history, stats, delete, version, ping, usage, watch, import-usage. Token from --token-file, BOTOPTIMIZER_TOKEN_FILE, or BOTOPTIMIZER_TOKEN. Project from --project, BOTOPTIMIZER_PROJECT, or ACL default_project. Server URL: BOTOPTIMIZER_URL (default http://127.0.0.1:8787/mcp). put --file / append --file read body/text from disk (never logged).
Usage (v0.4–v0.6): Log real provider token counts with usage log --type tokens --in N --out N whenever the API returns usage; optional --class chat|browser|mcp|script. Use usage hints, usage digest, watch suggest, and memory reset-pack for Credit Shield workflows. Use proxy etypes only when counts are hidden. Never fabricate token numbers. Charts prefer summed tokens; share/CSV are labeled fallbacks. See examples/usageproxy/README.md.
botoptimizer list --project demo
botoptimizer put plan --title "Plan" --body "…" --kind spec
botoptimizer append log --text "- update"
botoptimizer stats
Tools — example tools/call arguments
Pass the object below as the tool arguments (exact field names):
| Tool | Example arguments |
|---|---|
brief |
{"project":"demo","limit":40,"if_etag":"…"} |
list |
{"project":"demo","if_etag":"…"} |
changed |
{"project":"demo","since":"2026-11-01T12:00:00Z"} |
get |
{"project":"demo","key":"plan","head":50} |
put (create) |
{"project":"demo","key":"plan","kind":"spec","title":"Plan","body":"..."} |
put (update) |
{"project":"demo","key":"plan","title":"Plan","if_version":1} |
append |
{"project":"demo","key":"plan","text":"\n- update"} |
search |
{"project":"*","query":"handoff rollout"} |
history |
{"project":"demo","key":"plan"} |
stats |
{} |
usage_log |
{"project":"demo","bot":"my-agent","type":"tokens","in":1200,"out":400,"model":"…"} |
usage_import |
{"project":"demo","date":"2026-11-01","body":"{…share json…}"} |
usage_import_csv |
{"project":"demo","date":"2026-11-01","csv":"…","tz":"America/Chicago"} |
watch_check |
{"project":"demo","since":"2026-11-01"} |
usage_chart |
{"project":"demo","range":"7d","out":"/tmp/u.html"} |
usage_hints |
{"project":"demo","since":"2026-11-01T00:00:00Z"} |
reindex |
{"project":"demo"} (owner) |
delete |
{"project":"demo","key":"plan"} (owner; soft archive) |
delete is owner-only — writers get FORBIDDEN; ask the project owner. get still returns archived records (soft delete); list / search omit status=archived unless you pass status:"archived". Recover via get or history.
Kinds (closed set): decision, spec, handoff, assignment, note, usage.
Append create kind: botoptimizer append KEY --text … [--kind handoff|spec|decision|note|usage] (default note; invalid kind → KIND_INVALID).
Projects / keys: regex ^[a-z0-9][a-z0-9._-]{0,63}$ — unique key per project; no / in keys (use dotted names like handoff.review).
Conventions
- Prefer
handoffkeys likehandoff.revieworhandoff.pmfor turn/context handoffs; include next owner, status, and blockers in the body. - Start sessions with
brief(orlist); usechanged+if_etagto skip unchanged polls. - Use
appendfor chronological updates without a version check; useput+if_versionwhen replacing structured state. - Use
searchwith"project":"*"only when you need every granted project; otherwise name the project. - Archived records are hidden from
list/searchunless you filter withstatus:"archived";getandhistorystill read archived keys (soft delete is recoverable).
Failure modes
- Server down / connection refused / timeout: do not retry in a tight loop — report to the human operator once and wait for restart.
401/ token rejected: stop; do not mint or rotate tokens. Owner checks ACL / runsbotoptimizer acl grant … --rotate. After revoke, deny may take up to ~60s.FORBIDDEN: no grant for that project — ask the owner; do not spam other projects.CONFLICTonput:getthe record, retry once with the correctif_version; if still conflicting, escalate (another writer).NOT_FOUNDonget: useputorappend(appendcreates missing keys; default kindnote, override with--kind).- Never print bearer tokens, OAuth values, or raw ACL hashes in chat, logs, or issues.
Human quickstart (local)
cp .env.example .env
go build -o botoptimizer ./cmd/botoptimizer
botoptimizer serve # local vault under ~/.local/share/botoptimizer
# grant bots, then connect MCP or: botoptimizer stdio
v0.2 CLI/stdio/local features require build from source until the next release tag.
Optional Drive: docs/google-drive-setup.md. Multi-agent walkthrough: docs/examples-multi-agent.md.
For a throwaway Drive smoke vault: botoptimizer bootstrap --test-folder (see script header).
For dev-only ephemeral storage: BOTOPTIMIZER_BACKEND=memory (data lost on exit).
ACL: only SHA-256 token hashes in _acl.json. Mint with botoptimizer mint-token BOT_ID, grant with:
botoptimizer acl grant <bot> <project> <role> --token-out FILE [--default-project NAME]
Write tokens only to FILE (created mode 0600; must not exist). The CLI does not print raw tokens.
Tests (match CI):
gofmt -l . # must be empty
go vet ./...
go test -race ./...
# shared box: for p in $(go list ./...); do go test -count=1 -race "$p"; done
Smoke (real Drive): grant a throwaway smoke-* project, then scripts/smoke_drive.py (reads env only; never prints the token). See script header and CONTRIBUTING.md.
Box setup: scripts/setup_box.sh [--test] builds ~/.local/bin/botoptimizer and checks env by name. Override BOTOPTIMIZER_BIN only with an absolute path. Restart: scripts/restart_serve.sh.
Optional pilot notes: docs/pilot-verifychain.md.
Environment (BOTOPTIMIZER_*)
| Variable | Purpose |
|---|---|
BOTOPTIMIZER_ADDR |
Listen address (default 127.0.0.1:8787; loopback only) |
BOTOPTIMIZER_BACKEND |
local (default), drive, or memory |
BOTOPTIMIZER_DATA_DIR |
Local vault root (default XDG / %LOCALAPPDATA%\\botoptimizer) |
BOTOPTIMIZER_TOKEN_FILE / BOTOPTIMIZER_PROJECT |
Bot CLI / stdio defaults |
BOTOPTIMIZER_URL |
MCP URL for CLI (default loopback /mcp) |
BOTOPTIMIZER_DRIVE_ROOT_ID |
Drive vault root (optional) |
BOTOPTIMIZER_OAUTH_CLIENT_ID / SECRET / REFRESH_TOKEN |
Drive backend (server-side secrets) |
BOTOPTIMIZER_ACL_FILE |
Optional local ACL instead of Drive |
BOTOPTIMIZER_LOCK_FILE |
Optional single-instance lock path |
BOTOPTIMIZER_TEST_FOLDER |
Truthy (1/true/yes) for bootstrap --test-folder |
Safety (summary)
- Loopback bind only;
Authorization: Bearerrequired; bad/missing token → 401 withWWW-Authenticate: Bearer. - Single instance per Drive root per host (lock under
/var/tmpby default). - ACL reload ~60s; fails closed after repeated load failures (see SECURITY.md).
- Attribution (
created_by/updated_by) comes from the token; unknown JSON fields on tools are rejected. - Drive has no true CAS across hosts — do not run two servers against one root on different machines.
Limits
- Loopback only — not exposed to the public internet by design.
- One server process per Drive root per host.
- Not a secrets store — vault notes are Drive-readable.
- Deny-by-default ACL — no wildcard projects.
- Soft delete only —
delete/reindexrequire owner role (writers seeFORBIDDEN). - Windows: lock and token files are created without
O_NOFOLLOW; avoid symlinked paths in untrusted directories (see SECURITY.md). - No cross-host concurrency guarantee on the same Drive root.
License
BotOptimizer MCP questions
What tools does BotOptimizer MCP provide?
It exposes 16 tools, including brief, list, changed, get, append.
What happens if I delete a record in BotOptimizer?
The system uses soft deletes, meaning records are archived rather than permanently removed. You can recover them using the get or history tools.
Does BotOptimizer support Google Drive?
Yes, it supports an optional Google Drive backend for shared project state.