AI-friendly note-taking solution with MCP integration and web UI.
- Python 3.14+
- uv package manager
- git (optional, for version history)
uv syncRun the MCP server for AI assistants (stdio mode, no config needed):
uv run botnotesThen configure your MCP client (see Client Setup below).
Run the web interface for browsing and editing notes:
uv run botnotes-webOpens at http://localhost:3000 with:
- Browse and search notes
- Create, edit, and delete notes
- Tag-based organization
- REST API at
/api/*
Options: --port 3000, --host 127.0.0.1, --no-reload
Notes support extended markdown with:
- Standard markdown: headings, bold, italic, lists, links, images, blockquotes, code blocks
- Wiki links:
[[path]]or[[path|display text]]for linking between notes - Tables: GitHub-flavored markdown tables
- Task lists:
- [ ] todoand- [x] done - Strikethrough:
~~deleted~~ - Footnotes:
[^1]references - Definition lists: term/definition pairs
- Math:
$inline$and$$display$$expressions (rendered with KaTeX) - Mermaid diagrams: fenced code blocks with
mermaidlanguage
Example mermaid diagram:
```mermaid
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Result]
B -->|No| D[Other]
```Configure your AI assistant to connect to the local MCP server.
Add to your config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"botnotes": {
"command": "uv",
"args": ["run", "--directory", "/path/to/botnotes", "botnotes", "--author", "claude"]
}
}
}Restart Claude Desktop after saving.
Add to .vscode/mcp.json in your workspace:
{
"mcp": {
"servers": {
"botnotes": {
"command": "uv",
"args": ["run", "--directory", "/path/to/botnotes", "botnotes", "--author", "vscode"]
}
}
}
}Requires VS Code 1.102+ with chat.mcp.discovery.enabled setting.
Add via Cursor Settings > MCP, or edit mcp.json:
{
"mcpServers": {
"botnotes": {
"command": "uv",
"args": ["run", "--directory", "/path/to/botnotes", "botnotes", "--author", "cursor"]
}
}
}Add via CLI (recommended):
claude mcp add --transport stdio botnotes -- \
uv run --directory /path/to/botnotes botnotes --author claude-codeOr add to ~/.claude.json manually:
{
"mcpServers": {
"botnotes": {
"type": "stdio",
"command": "uv",
"args": ["run", "--directory", "/path/to/botnotes", "botnotes", "--author", "claude-code"]
}
}
}Use /mcp within Claude Code to manage connections and check status.
Open Perplexity → Settings → MCP Servers → Add Server:
{
"mcpServers": {
"botnotes": {
"command": "uv",
"args": ["run", "--directory", "/path/to/botnotes", "botnotes", "--author", "perplexity"]
}
}
}For remote MCP access over HTTPS with bearer token authentication.
uv run botnotes-admin auth add my-agentThis generates a secure token and displays it once. Save it for client configuration.
uv run botnotes-admin serve
uv run botnotes-admin serve --host 0.0.0.0 --port 9000 # custom bindUse Caddy, nginx, or similar for TLS termination. Caddy example:
botnotes.example.com {
reverse_proxy localhost:8080
}
VS Code (v1.102+) - native HTTP support in .vscode/mcp.json:
{
"servers": {
"botnotes": {
"type": "http",
"url": "https://botnotes.example.com/mcp",
"headers": {
"Authorization": "Bearer ${input:botnotes-api-key}"
}
}
},
"inputs": [
{
"type": "promptString",
"id": "botnotes-api-key",
"description": "BotNotes API Key",
"password": true
}
]
}Claude Code - native HTTP support:
claude mcp add --transport http botnotes https://botnotes.example.com/mcp \
--header "Authorization: Bearer YOUR_TOKEN"Or in ~/.claude.json:
{
"mcpServers": {
"botnotes": {
"type": "http",
"url": "https://botnotes.example.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}Claude Desktop / Cursor - requires mcp-remote proxy:
{
"mcpServers": {
"botnotes": {
"command": "npx",
"args": [
"mcp-remote",
"https://botnotes.example.com/mcp",
"--header",
"Authorization: Bearer ${AUTH_TOKEN}"
],
"env": {
"AUTH_TOKEN": "your-secret-token-here"
}
}
}
}Note: Claude's web UI Connectors (Settings → Connectors) only support OAuth, not bearer tokens.
For home servers, the deploy/ directory contains helper scripts to run both MCP and web servers behind Caddy with HTTPS (using Tailscale certificates):
cd deploy
cp config.env.example config.env
./setup-tailscale.sh
./start.shSee deploy/README.md for full documentation.
BotNotes supports git-based version history for all changes. Every note operation (create, update, delete) is tracked in a git repository with full history preserved.
- View history: See all changes to a note with timestamps and authors
- View old versions: Read any previous version of a note
- Compare versions: Diff between any two versions
- Restore versions: Restore a note to any previous version (creates a new commit)
- MCP (stdio): Requires
--authorflag (see client setup above) - Web UI: Uses authenticated username, or "web" if auth is disabled
To enable version history for existing notes:
uv run botnotes-admin init-gitThis initializes a git repository and commits all existing notes.
Command-line tools for administration:
# Initialize version history for existing notes
uv run botnotes-admin init-git
# Migrate data to latest version
uv run botnotes-admin migrate
uv run botnotes-admin migrate --yes # skip confirmation
# Manage API keys for MCP HTTP mode
uv run botnotes-admin auth list # List configured keys
uv run botnotes-admin auth add <name> # Generate and add new key
uv run botnotes-admin auth remove <name> # Remove a key
# Manage web UI authentication
uv run botnotes-admin web set-password # Set username and password
uv run botnotes-admin web set-password admin # Set password for user 'admin'
uv run botnotes-admin web clear-password # Disable web authentication
# Rebuild search and backlinks indexes
uv run botnotes-admin rebuild
# Export all notes to backup archive
uv run botnotes-admin export # → botnotes-backup-YYYY-MM-DD.tar.gz
uv run botnotes-admin export backup.tar.gz # custom filename
# Import notes from backup archive
uv run botnotes-admin import backup.tar.gz # merge with existing
uv run botnotes-admin import backup.tar.gz --replace # replace all notes
# Delete all notes
uv run botnotes-admin clear # prompts for confirmation
uv run botnotes-admin clear --force # skip confirmationWhen upgrading BotNotes, you may need to migrate your data if the storage format has changed. If migration is required, you'll see an error like:
Error: Data version X found, but version Y required. Run 'botnotes-admin migrate' to upgrade.
Run the migration:
uv run botnotes-admin migrateThe migration shows what changes are needed and asks for confirmation. Use --yes to skip confirmation (useful for scripts).
Run all checks (ruff, mypy, pytest):
uv run poe checkOr run individually:
uv run poe test # tests
uv run poe lint # linting
uv run poe typecheck # type checking