MCP server for mdgen — read and write your mdgen documents from Claude Desktop, Claude Code, Codex CLI, and other MCP clients, using your own account. The AI runs on your subscription; mdgen never pays for generation.
Exposes your saved mdgen documents (available to logged-in users) as MCP tools:
| Tool | Description |
|---|---|
list_documents |
List your documents (id, title, mode, updatedAt) |
read_document |
Get a document's full Markdown by id |
create_document |
Create a new document (markdown, title?, mode?) |
update_document |
Update a document (only provided fields change) |
delete_document |
Delete a document by id |
- A mdgen account (sign in at https://mdgen.app).
- A personal access token (PAT): issue one from mdgen while logged in (Menu → API tokens). Copy it — it is shown only once.
| Variable | Required | Default | Description |
|---|---|---|---|
MDGEN_TOKEN |
✅ | — | Your mdgen personal access token |
MDGEN_API_URL |
https://api.mdgen.app/v1 |
mdgen API base URL (must include the version prefix) |
claude_desktop_config.json:
{
"mcpServers": {
"mdgen": {
"command": "npx",
"args": ["-y", "mdgen-mcp"],
"env": {
"MDGEN_TOKEN": "<your token>"
}
}
}
}claude mcp add mdgen --env MDGEN_TOKEN=<your token> -- npx -y mdgen-mcp~/.codex/config.toml:
[mcp_servers.mdgen]
command = "npx"
args = ["-y", "mdgen-mcp"]
env = { MDGEN_TOKEN = "<your token>" }- Your PAT is passed via your client's
envand never leaves your machine except as aAuthorization: Bearerheader to the mdgen API. It is not stored in this package. - The PAT grants access only to your documents. Revoke it anytime from mdgen.
- Treat the token like a password. Do not commit it.
npm install
npm run dev # run from source (tsx)
npm run build # emit dist/
npm test # unit testsReleases publish to npm via GitHub Actions on v* tags, using
npm Trusted Publishing (OIDC, no token)
with build provenance.
npm version patch # bump version + create commit/tag
git push && git push --tagsMIT © Shien Inc.
Part of mdgen.