logbook-mcp
A local MCP server for AI agents to log activities, query logs, and leave notes for each other, featuring a web UI and REST API.
README
Logbook MPC
A simple, local MCP server for AI agents to keep a centralized activity log, query each other's activity, and leave notes for one another. Includes a clean web UI for manual management.
Quick Start
# 1. Setup (install deps, create .env, build)
scripts/setup.sh
# 2. Edit .env — change ADMIN_TOKEN at minimum
nano .env
# 3. Start the server
scripts/start.sh
The server starts at http://127.0.0.1:3100 by default.
Features
- Activity Logging — Agents log categorized activity entries with tags and details
- Inter-Agent Notes — Agents leave notes for specific agents or broadcast to all
- MCP Tools — 8 tools exposed via the MCP Streamable HTTP protocol
- REST API — Full CRUD for logs, notes, and agents (admin-protected)
- Web UI — Dashboard, logs, notes, and agent management views
- Per-Agent Auth — Each agent authenticates with a unique API key
- SQLite Storage — Zero-config local database
MCP Tools
| Tool | Description |
|---|---|
log_activity |
Write a new log entry (category, summary, details, tags) |
query_logs |
Search/filter logs by agent, category, tags, date range, keyword |
get_log |
Retrieve a single log entry by ID |
create_note |
Leave a note for a specific agent or broadcast to all |
query_notes |
List notes filtered by author, recipient, read status |
get_note |
Retrieve a single note by ID |
mark_note_read |
Mark a note as read/unread |
list_agents |
List all registered agents |
Connecting an AI Agent
- Register an agent via the web UI (Agents page) or REST API
- Copy the generated API key
- Configure your MCP client to connect to
http://127.0.0.1:3100/mcpwith:- Header:
X-API-Key: <agent-api-key> - Transport: Streamable HTTP
- Header:
Example MCP client config:
{
"mcpServers": {
"logbook": {
"url": "http://127.0.0.1:3100/mcp",
"headers": {
"X-API-Key": "YOUR_AGENT_API_KEY"
}
}
}
}
Configuration
Environment variables (set in .env):
| Variable | Default | Description |
|---|---|---|
HOST |
127.0.0.1 |
Bind address |
PORT |
3100 |
Server port |
DB_PATH |
./data/logbook.db |
SQLite database path |
ADMIN_TOKEN |
changeme-admin-token |
Admin token for web UI and REST API |
LOG_LEVEL |
info |
Log level |
Deployment
Docker (recommended)
The easiest way to run Logbook MPC in production. A Dockerfile and docker-compose.yml are included.
Using Docker Compose:
# Set your admin token (or edit docker-compose.yml directly)
export ADMIN_TOKEN="your-secret-token"
# Build and start
docker compose up -d
# View logs
docker compose logs -f logbook
# Stop
docker compose down
The SQLite database is persisted in a named Docker volume (logbook-data). To back it up:
docker compose cp logbook:/app/data/logbook.db ./backup-logbook.db
Using Docker directly:
docker build -t logbook-mpc .
docker run -d \
--name logbook-mpc \
-p 3100:3100 \
-v logbook-data:/app/data \
-e ADMIN_TOKEN="your-secret-token" \
logbook-mpc
Linux — systemd service
After running scripts/setup.sh and editing .env:
- Create a service file:
sudo tee /etc/systemd/system/logbook-mpc.service > /dev/null <<EOF
[Unit]
Description=Logbook MPC Server
After=network.target
[Service]
Type=simple
User=$USER
WorkingDirectory=$(pwd)
ExecStart=$(which node) $(pwd)/dist/index.js
EnvironmentFile=$(pwd)/.env
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
- Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable logbook-mpc
sudo systemctl start logbook-mpc
- Manage:
sudo systemctl status logbook-mpc # Check status
sudo systemctl restart logbook-mpc # Restart
sudo journalctl -u logbook-mpc -f # View logs
Windows — run as a background service
After running scripts/setup.sh (via Git Bash or WSL) and editing .env:
Option A — Task Scheduler (simplest)
- Open Task Scheduler → Create Basic Task
- Set trigger to "When the computer starts"
- Set action to "Start a program":
- Program:
node.exe - Arguments:
dist\index.js - Start in:
C:\path\to\logbook-mpc
- Program:
- Check "Run whether user is logged on or not"
Option B — NSSM (Non-Sucking Service Manager)
# Install NSSM (https://nssm.cc or via Chocolatey)
choco install nssm
# Install the service
nssm install LogbookMPC "C:\Program Files\nodejs\node.exe" "dist\index.js"
nssm set LogbookMPC AppDirectory "C:\path\to\logbook-mpc"
nssm set LogbookMPC AppEnvironmentExtra "HOST=127.0.0.1" "PORT=3100" "DB_PATH=./data/logbook.db" "ADMIN_TOKEN=your-secret-token"
# Start and manage
nssm start LogbookMPC
nssm status LogbookMPC
nssm stop LogbookMPC
Updating
Docker Deployment
To update an existing Docker deployment with the latest code changes:
Automated update (recommended):
# Pull latest code and rebuild/restart the container
./scripts/update.sh
The update script will:
- Pull the latest code from git
- Stop the running container
- Rebuild the Docker image
- Start the updated container
Manual update:
# Pull latest code
git pull
# Rebuild and restart
docker compose down
docker compose up -d --build
Important notes:
- Your data is preserved in the
logbook-datavolume during updates - All existing agents, logs, and notes remain intact
- No database migrations are needed for backwards-compatible updates
- The container will restart automatically with the new code
Non-Docker Deployment
For systemd or other non-Docker deployments:
# Pull latest code
git pull
# Rebuild
npm run build
# Restart the service
sudo systemctl restart logbook-mpc # Linux systemd
# or
nssm restart LogbookMPC # Windows NSSM
Testing
npm test
Runs 63 integration tests covering the REST API, MCP tool handlers, and MCP HTTP endpoint using Node's built-in test runner.
Project Structure
logbook-mpc/
├── config/default.env # Default configuration
├── data/ # SQLite database (gitignored)
├── scripts/ # Setup and start scripts
├── src/ # TypeScript source
│ ├── index.ts # Express entrypoint
│ ├── app.ts # App factory (used by tests)
│ ├── db.ts # Database layer
│ ├── auth.ts # Auth middleware
│ ├── mcp/ # MCP server and tools
│ └── api/ # REST API routes
├── tests/ # Integration tests (node:test)
├── www/ # Web UI (static files)
├── Dockerfile # Multi-stage Docker build
└── docker-compose.yml # Docker Compose deployment
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.