Athena MCP
Provides tools for searching, reading, creating, updating, appending to, moving, and deleting Markdown pages in a Wiki.js instance, as well as saving conversations and capturing quick notes, enabling AI assistants to manage a personal wiki.
Click on "Install 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., "@Athena MCPsearch my wiki for Django deployment guide"
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.
Athena
A personal wiki your AI writes to, and you can browse yourself.
Athena puts an MCP server in front of Wiki.js. Your assistant searches the wiki, reads pages, and files new ones back: notes, documentation, whole conversations. Everything it writes is an ordinary Markdown page you can open, edit, and keep long after any particular model is gone.
Claude / ChatGPT / Cursor
│ MCP over HTTPS
▼
athena-mcp ──── search ──▶ Wiki.js (keyword) + Postgres (meaning)
│ read ────▶ Wiki.js
└──────── write ───▶ Wiki.js ──▶ athena-indexer ──▶ PostgresWiki.js holds the truth. The vector index only helps find things, and can be deleted and rebuilt at any time.
Get running | |
Use it | |
Run it for real | |
Reference |
Quickstart
Local, in about five minutes. For anything on the internet, read Deploy to a server first.
git clone https://github.com/jannismilz/athena.git
cd athena
cp .env.example .env
$EDITOR .env # fill in every CHANGE_ME, one per secret:
# openssl rand -hex 32
docker compose up -dThen:
Open Wiki.js and complete the setup wizard.
In Wiki.js: Administration → API, enable it, create a token, and put it in
.envasWIKI_API_TOKEN.docker compose up -dagain to pick it up.Open the dashboard and sign in with
DASHBOARD_TOKEN.
Nothing publishes a port, so reach the services through your reverse proxy, or
add a temporary ports: mapping while trying it out.
The first start downloads an embedding model of a few hundred MB. The indexer
retries until it is ready, so embeddings looking unhealthy for a minute or two
on first boot is expected.
Connect your AI
Everything is served from MCP_PUBLIC_URL, which must be a bare https://
origin with no path. Not /mcp.
Claude.ai → Settings → Connectors → Add custom connector
URL:
https://athena-mcp.example.com/mcpLeave client ID and secret empty. Athena registers the client itself.
A browser page asks for a password. It is your
MCP_TOKEN.
Cursor, Claude Desktop, and other header clients
{
"mcpServers": {
"athena": {
"url": "https://athena-mcp.example.com/mcp",
"headers": { "Authorization": "Bearer YOUR_MCP_TOKEN" }
}
}
}Tools
Tool | What it does |
| Keyword and semantic search, fused. Every hit carries a path. |
| Full Markdown of one page |
| Heading outline, without the body |
| Add under a heading, leaving the rest untouched |
| New Markdown page |
| Replace a page body |
| Move or rename |
| Delete, and drop it from the index |
| File a conversation under |
| Quick note into |
| Everything, with paths and timestamps |
| Size, shape and staleness, so the AI can answer what is missing |
append_to_page is the one worth knowing about: adding a fact costs a
paragraph, not a rewrite of the whole page.
Why it retrieves well. Exact terms hit the Wiki.js full-text index, vague questions hit the vector index, and results are fused with reciprocal rank fusion so neither source can bury the other. Chunks record the headings above them, so what comes back keeps its context. Every page an assistant touches is stamped with which one it was and when, taken from the authenticated client rather than from what the model claims about itself.
Dashboard
Its own service, on port 8082. Sign in with DASHBOARD_TOKEN; there is no token
in any URL. For scripts, use a bearer header:
curl -H "Authorization: Bearer $DASHBOARD_TOKEN" \
https://wiki.example.com/dashboard/api/metrics?days=30Panel | Answers |
Content | pages, words, per area, largest, going stale |
AI activity | calls per day, which tools, which assistant, read vs write |
Searches that found nothing | what your wiki could not answer |
Index health | chunks stored, pages indexed, how far behind |
Backup | when the last run finished, how big, where it went |
The third row is the one that earns its place. Every entry is a page worth writing.
It is read-only twice over: it never writes, and it connects to Postgres as
athena_readonly, a role holding SELECT and nothing else. Figures are
aggregated in Postgres and cached, so a refresh costs almost nothing.
Deploy to a server
A 4 GB VPS runs everything, including the embedding model on CPU.
1. Host and firewall
sudo ufw default deny incoming && sudo ufw default allow outgoing
sudo ufw allow 22/tcp && sudo ufw allow 80/tcp && sudo ufw allow 443/tcp
sudo ufw enableInstall Docker, then create a user that owns the deployment:
sudo useradd --create-home --shell /bin/bash athena
sudo usermod -aG docker athena
sudo mkdir -p /srv/athena && sudo chown athena:athena /srv/athenaRun compose as that user, never with sudo, or the bind mounts end up owned by
root. Membership of the docker group is equivalent to root on the host, so
keep it small.
2. DNS
Two A records pointing at the host:
Name | Serves |
| Wiki.js, and the dashboard under |
| the MCP endpoint |
3. Configure
cd /srv/athena
git clone https://github.com/jannismilz/athena.git .
cp .env.example .env
chmod 600 .env # it holds every secretSet at minimum:
ATHENA_DATA_DIR=/srv/athena/data
POSTGRES_PASSWORD=...
MCP_TOKEN=...
DASHBOARD_TOKEN=...
DASHBOARD_DB_PASSWORD=...
MCP_PUBLIC_URL=https://athena-mcp.example.com
WIKI_PUBLIC_URL=https://wiki.example.com4. Reverse proxy
No container publishes a port. Everything lives on the athena Docker network,
which your proxy joins. Route these:
Host | To | Notes |
|
| WebSocket upgrade, 100M body limit |
|
| |
|
| must not buffer, MCP streams |
Forward X-Forwarded-For: the logins throttle per address, and without it every
attempt looks like it came from the proxy.
Run nginx as a container joined to the athena network, as below, or on the
host with a ports: mapping bound to 127.0.0.1.
server {
listen 80;
server_name wiki.example.com;
location / {
proxy_pass http://wikijs:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
client_max_body_size 100M;
proxy_read_timeout 120s;
}
location /dashboard/ {
proxy_pass http://dashboard:8082/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
server {
listen 80;
server_name athena-mcp.example.com;
location / {
proxy_pass http://mcp:8080;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# MCP streams responses. Without these, long tool calls appear to hang.
proxy_set_header Connection "";
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 300s;
}
}Then issue certificates with certbot, or terminate TLS wherever you already do.
5. Start, then lock the wiki down
docker compose up -d && docker compose psComplete the Wiki.js wizard immediately. Until you do, anyone who finds the host can claim the admin account. Then, in Wiki.js:
Groups → Guests: remove read access, unless you want the wiki public.
Auth: turn off self-registration.
API: enable it and create the token for
WIKI_API_TOKEN.
6. Verify
curl -s https://athena-mcp.example.com/health
# Must reject unauthenticated calls:
curl -s -o /dev/null -w '%{http_code}\n' -X POST https://athena-mcp.example.com/mcp
# expected: 401Backups
One pg_dump is a complete backup. Wiki.js keeps pages, history, users,
permissions, settings and the bytes of every uploaded file in Postgres.
Uploads live in the assetData table; the files under data/wikijs/uploads are
only a cache. Athena's activity log and search vectors are in a second database
on the same server.
Data | In the backup |
Pages, history, users, settings | yes |
Uploaded images and files | yes |
Activity log and search vectors | yes |
Index bookkeeping, OAuth registrations | no, rebuilt or reconnected |
| no, keep a copy in a password manager |
The backup container runs hourly. Each run dumps both databases, checks every
dump is readable, keeps a local copy, pushes to your rclone destination,
verifies the upload matches, and only then prunes. A failed run can never delete
your last good backup.
docker compose run --rm backup now # take one now
docker compose run --rm backup restore list # see what exists
docker compose logs -f backup # watch the scheduleConfigure it entirely in .env. Any rclone destination works: S3, Backblaze,
Wasabi, MinIO, Hetzner. Leave BACKUP_REMOTE empty to keep backups on the host
only.
Add a crypt remote and point BACKUP_REMOTE at it. The destination then only
ever receives ciphertext, including file names.
BACKUP_REMOTE=crypt:
RCLONE_CONFIG_CRYPT_TYPE=crypt
RCLONE_CONFIG_CRYPT_REMOTE=s3:my-bucket/athena
RCLONE_CONFIG_CRYPT_PASSWORD=<rclone obscure ...>
RCLONE_CONFIG_CRYPT_PASSWORD2=<rclone obscure ...>Keep both passwords in your password manager. Without them the backups are unreadable, including by you.
Restoring
Practise this before you need it. A restore nobody has run is a guess.
docker compose run --rm backup restore list
docker compose stop wikijs mcp indexer dashboard
docker compose run --rm backup restore run 2026-08-18T115529Z
docker compose start wikijs mcp indexer dashboardIt asks you to type the database name to confirm. restore fetch <stamp>
downloads a backup without restoring it, and reports whether each dump is
readable.
The search index repairs itself afterwards: the indexer re-reads every page and re-embeds anything whose content changed.
Configuration
Everything comes from the environment. Each service validates its own configuration at boot and exits with a list of what is wrong, so a typo fails immediately rather than at three in the morning.
The five secrets, all generated by you. No credential belonging to Claude,
OpenAI or anyone else is ever stored in .env.
Secret | Held by | Protects |
| postgres, mcp, indexer | full database access |
| mcp, indexer | the Wiki.js API |
| mcp | the MCP endpoint |
| dashboard | the dashboard sign-in |
| dashboard, mcp, indexer | a SELECT-only database role |
What runs
Service | Port | What it is |
| internal | Wiki.js data, activity log, and vectors via pgvector |
| 3000 | The wiki you read and edit |
| internal | The embedding model, on CPU |
| 8080 | What your AI connects to |
| 8081 | Keeps the vector index in step with the wiki |
| 8082 | Metrics |
| none | Hourly dump, verify, push |
There is no separate vector database. Vectors live in Postgres, so one backup covers everything.
On ARM hosts the embeddings image is published for
linux/amd64only and will not run natively. PointEMBEDDINGS_PROVIDER=openaiat an OpenAI-compatible endpoint such as Ollama instead.
Variable | Default | Notes |
|
| Root of every bind mount |
|
| Shown on the login page and dashboard |
|
|
|
|
| Provenance stamps and dated paths |
|
| The Wiki.js database |
|
| Activity log and vectors, created automatically |
|
| Content language |
|
| Used for dashboard links |
| required | Bare https origin, no path |
|
| How long dashboard figures are reused |
|
| Changing it re-indexes everything |
|
|
|
|
| Full reconciliation interval |
|
| Chunk size ceiling |
| see | Schedule, retention, rclone destination |
Changing EMBEDDINGS_MODEL changes the vector width, and vectors from two
models cannot be compared, so the indexer rebuilds the table and re-embeds every
page. Wiki.js content is untouched.
Security
Each container receives only the credentials it uses. The dashboard gets neither
POSTGRES_PASSWORD nor WIKI_API_TOKEN, so compromising it yields read access
and nothing more. Check at any time:
docker inspect athena-dashboard -f '{{range .Config.Env}}{{println .}}{{end}}' | grep -iE 'PASSWORD|TOKEN'Unauthenticated MCP requests get 401 and no explanation.
Both login paths throttle after 5 failures per address; a login link burns after 3 attempts.
Dashboard sessions are signed cookies carrying an expiry and a nonce, never the token.
HttpOnly,SameSite=Strict, and cross-site posts are refused.Secret comparisons are constant time.
Proxy headers are trusted only from loopback, so a remote client cannot forge its address to escape a throttle.
Containers run as a non-root user.
Deliberately absent: per-tool permissions. Any authenticated client can call
every tool, including delete_page. Wiki.js keeps page history so a delete is
recoverable, but treat MCP_TOKEN as full write access to your wiki. Athena
also assumes a single owner; Wiki.js has its own users for reading the wiki.
MCP_TOKEN works two ways, because AI clients authenticate two ways.
Header clients such as Cursor and Claude Desktop send
Authorization: Bearer <MCP_TOKEN>. That is the whole mechanism.
Claude.ai in the browser cannot do that. Its custom connectors only support OAuth, and the MCP specification requires dynamic client registration, so a server that accepts browser Claude has to be an authorization server. Athena implements one:
Claude registers itself and receives a generated client id. No secret of yours is involved.
Claude sends you to a login page on your own server.
You type
MCP_TOKENas the password. That is the human approval step.Athena issues Claude tokens that Athena minted itself.
Those tokens are written to data/mcp/oauth-state.json, never to .env.
Revoke them with:
rm data/mcp/oauth-state.json && docker compose restart mcpIf you never use browser Claude, ignore all of this. The bearer path does not touch it.
Operations
docker compose logs -f mcp
curl -s localhost:8081/stats | python3 -m json.tool
# Force a full reconciliation
docker compose exec -T indexer bun -e 'await fetch("http://127.0.0.1:8081/sync",{method:"POST"})'Upgrading. Always back up first: Wiki.js runs its own migrations on start, and those are not reversible by stopping the container.
docker compose run --rm backup now
git pull && docker compose build && docker compose up -dSymptom | Cause |
A service exits at boot listing config | A required variable is missing or still |
Claude cannot connect, no login page |
|
Login rejects the right password | Throttled after 5 failures, wait a minute |
No semantic search results |
|
Dashboard shows pages behind | Indexer catching up, check its logs |
Tool calls fail with 401 | State file cleared or token changed, reconnect the client |
Postgres exits, "database files are incompatible" | The image major version changed under existing data |
Postgres will not read a data directory written by a different major version. Dump, wipe, restore:
docker compose run --rm backup now # on the OLD version
docker compose down
mv data/postgres data/postgres.old # keep until you are happy
# edit the image tag in docker-compose.yml and the FROM line in
# docker/backup/Dockerfile to the same new major version
docker compose build backup
docker compose up -d postgres
docker compose run --rm backup restore run <stamp> # once per database
docker compose up -dThe vector index restores with everything else, so nothing is re-embedded.
Development
bun install
bun test # 145 tests
bun run check # typecheck, lint, testPackage | What it is |
| Wiki.js client, chunking, search merge, vectors, auth, config |
| MCP server, OAuth authorization server, the tools |
| Sync loop, embeddings, vector writes, internal search API |
| Metrics interface |
| Backup and restore container |
| The one-page site |
| Optional Wiki.js CSS and JS |
Bun runs TypeScript directly, so there is no build step and the containers run
the source. bun run --cwd packages/dashboard preview writes a preview.html
with sample data.
How it fits together:
The indexer is incremental. It fingerprints each page and skips anything unchanged, so a pass over an untouched wiki costs nothing.
Every service with admin credentials prepares the database at boot, under an advisory lock, so start order does not matter.
The dashboard is server-rendered HTML with inline SVG charts. No client JavaScript, no chart library, no build step.
Publishing the website. website/index.html deploys to GitHub Pages on
every push that touches it. Enable Pages once by hand first: Settings → Pages
→ Build and deployment → Source: GitHub Actions. This cannot be automated,
because creating a Pages site needs a token with administration rights and
GITHUB_TOKEN does not have them.
License
Apache-2.0. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Person-owned, portable AI memory as a remote MCP server, readable and writable by any MCP client.
An MCP server that gives your AI access to the source code and docs of all public github repos
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jannismilz/athena'
If you have feedback or need assistance with the MCP directory API, please join our Discord server