alexandrie-mcp
OfficialThis server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
alexandrie-mcp
Model Context Protocol server for Alexandrie β the self-hosted, open-source Markdown knowledge base.
Let AI agents search, read, write and organize your knowledge base: documents, workspaces, categories, Kanban boards, sharing, files and backups.
π©πͺ Deutsche Anleitung Β· π Tool reference Β· π§© MetaMCP guide Β· π Security
Features
32 tools in 7 toolsets β orientation, full-text search, reading, surgical editing, Kanban, sharing, files, backups, admin stats.
Agent-friendly design β compact tree outlines, chunked reading, atomic find/replace & section edits, dry-run deletes, actionable errors.
Pixel-perfect documents β uses Alexandrie's own Markdown compiler (LaTeX, mermaid, containers, task lists, internal links).
Safe updates β read-merge-write for Alexandrie's full-replace
PUT, optimistic concurrency withexpected_updated_timestamp.Two transports β
stdiofor local clients and MetaMCP STDIO, hardened Streamable HTTP for remote use / MetaMCP.Security first β bearer auth, DNS-rebinding protection, rate limiting, read-only mode, toolset allow-list, no account-management tools, secret redaction.
Automatic session handling β cookie login, refresh, re-login, optional TOTP 2FA.
MCP resources & prompts β
alexandrie://tree,alexandrie://node/{id}, Q&A / save / Kanban stand-up prompts.Tested against a real Alexandrie backend; 66 unit tests + live integration test.
Related MCP server: secondbrain-mcp
Quick start
1. Service account
Create a dedicated Alexandrie user for your agents (e.g. ai-agent) via the sign-up page or an admin.
Share the workspaces the agents may use with it. Do not use your personal admin account.
2FA? Set
ALEXANDRIE_TOTP_SECRETto the base32 secret shown when enabling 2FA. SSO only? Native login must be enabled on the backend (CONFIG_DISABLE_NATIVE_LOGIN=false) for the service account.
2a. Local client (Claude Desktop, Cursor, VS Code, β¦) β stdio
{
"mcpServers": {
"alexandrie": {
"command": "npx",
"args": ["-y", "github:oliverhees/alexandrie-mcp"],
"env": {
"ALEXANDRIE_API_URL": "https://api.notes.example.com",
"ALEXANDRIE_USERNAME": "ai-agent",
"ALEXANDRIE_PASSWORD": "β’β’β’β’β’β’β’β’",
"ALEXANDRIE_FRONTEND_URL": "https://notes.example.com"
}
}
}
}2b. Server / MetaMCP β Docker + Streamable HTTP
git clone https://github.com/oliverhees/alexandrie-mcp.git && cd alexandrie-mcp
cp .env.example .env && openssl rand -hex 32 # put the token into MCP_AUTH_TOKEN, fill ALEXANDRIE_*
docker compose -f docker-compose.example.yml up -dEndpoint: http://alexandrie-mcp:3000/mcp with header Authorization: Bearer <MCP_AUTH_TOKEN>.
Full walkthrough: docs/METAMCP.md.
2c. From source
npm ci && npm run build
ALEXANDRIE_API_URL=http://localhost:8201 ALEXANDRIE_USERNAME=ai-agent ALEXANDRIE_PASSWORD=β¦ node dist/index.js
# or: node dist/index.js --transport http --port 3000 (needs MCP_AUTH_TOKEN)Inspect interactively: npm run inspector.
Configuration
All settings are environment variables (see .env.example). Every secret also accepts a <NAME>_FILE variant for Docker/Kubernetes secrets.
Variable | Default | Description |
| β (required) | Backend URL (API, default port 8201). A trailing |
| β (required) | Service account. |
| β | Base32 TOTP secret if the account uses 2FA. |
| β | Enables clickable |
| β / | Public S3 URL + bucket path for direct file links. |
|
| Expose only read tools. |
|
| Expose delete / revoke tools. |
| all but |
|
|
| Max characters of content per response. |
|
| Upload limit (Alexandrie default is 20 MB). |
|
| Timeout per backend request. |
|
| Allow |
|
|
|
|
| HTTP listener (Docker image: |
| β (required for http) | Bearer token, β₯ 32 chars. |
|
| Only if another layer authenticates. |
| loopback only when bound to loopback | Host-header allow-list. |
| β | Browser origins allowed ( |
|
| No sessions; each POST is independent. |
|
| Session store bounds. |
|
| Per client IP, |
|
| Use |
|
|
|
HTTP endpoints: POST/GET/DELETE /mcp, GET /healthz (liveness), GET /readyz (Alexandrie login works).
Tools
Toolset | Tools |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All tool names are prefixed with alexandrie_. Details, parameters and recommended agent workflows: docs/TOOLS.md.
Architecture
MCP client / MetaMCP ββstdio | Streamable HTTPβββΆ alexandrie-mcp ββHTTPS + session cookieβββΆ Alexandrie backend (Go) βββΆ MySQL / S3
β
ββ tools/ zod-validated tools, gated by toolset & safety flags
ββ services/ tree, read-merge-write, Kanban, content edits
ββ markdown/ Alexandrie's Markdown compiler (vendored, MIT)
ββ alexandrie/ API client: login, refresh, TOTP, retries, errorsDevelopment
npm ci
npm run lint && npm run typecheck && npm test
npm run test:coverage
# Live test against a real backend (creates & deletes a temporary workspace):
ALEXANDRIE_IT_URL=http://localhost:8201 ALEXANDRIE_IT_USERNAME=β¦ ALEXANDRIE_IT_PASSWORD=β¦ npm run test:integrationSee CONTRIBUTING.md. Compatible with Alexandrie's current API (/api/nodes, /api/resources, /api/backup, β¦).
License
MIT Β© Oliver Hees / Aiianer and contributors. Includes Alexandrie's Markdown compiler (MIT Β© 2021 Alexandrie) β see THIRD_PARTY_NOTICES.md. This is a community project and not affiliated with the Alexandrie maintainers.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Markdown workspace for AI agents: read, write, organize, and share markdown documents.
Markdown notes and whiteboards your AI agent can read and write.
Persistent docs and memory for AI agents β read, write, organize & search a shared workspace.
Manage, share, and collaborate on Markdown-based documents with team members and agents.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA self-hosted Markdown knowledge base and Agent Harness with an MCP server that enables AI agents to read and write notes, providing persistent memory and a shared workspace for multi-agent collaboration.2MIT
- AlicenseBqualityBmaintenanceEnables AI agents to securely read, search, and write to a local Markdown knowledge base with hybrid RAG retrieval, privacy zones, hash-locked writes, audit logging, and rollback-safe archiving.13MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to search, read, and update a document workspace's knowledge through tools, prompts, and resources, either hosted or self-hosted.-
- AlicenseAqualityBmaintenanceEnables AI agents to create, read, update, delete, search, and explore linked Markdown pages in a self-hosted knowledge base through MCP tools.18MIT