> MCP server.
A Model Context Protocol server for MDflow. It lets MCP-capable agents pull markdown documents from your workspace, use folder descriptions as context, manage workspaces, folders, and documents you own, and control public and private sharing. Two ways to connect: the hosted remote server at https://mdflow.cz/api/mcp, or a local server that runs on your machine over stdio. The hosted server accepts an OAuth sign-in — Claude and ChatGPT connect by pasting the URL, with no token to copy — or a Personal Access Token; the local server uses a Personal Access Token. Both expose the same tools, except the local server adds one auth-setup helper (mdflow_auth_help).
What it exposes
| Tool | What it does |
|---|---|
| mdflow_auth_help | Shows token setup instructions (does not require a token). Local stdio server only — the hosted remote server is already authenticated. |
| mdflow_list_folders | Lists folders, each with its workspace_id and full path — descriptions are the primary context signal for the documents inside. Optionally filter to one workspace. |
| mdflow_get_folder | Gets one folder with its full path and its compounded description — the cascade of descriptions from the workspace down to the folder. |
| mdflow_create_folder | Creates a folder with an optional description. Pass parent_id to nest it under another folder. |
| mdflow_update_folder_description | Replaces a folder description. |
| mdflow_rename_folder | Renames a folder; a duplicate name gets a numeric suffix. |
| mdflow_delete_folder | Deletes a folder and the documents inside it. |
| mdflow_move_folder | Reparents a folder: nests it under another folder, or omit parent_id (or pass null) to move it to the top level. |
| mdflow_list_workspaces | Lists the workspaces you own, each with its name and description. |
| mdflow_create_workspace | Creates a workspace with an optional description. Duplicate names get a numeric suffix. |
| mdflow_rename_workspace | Renames a workspace; a duplicate name gets a numeric suffix. |
| mdflow_update_workspace_description | Replaces a workspace's description. |
| mdflow_delete_workspace | Deletes a workspace and every folder and document inside it. Cannot delete your last workspace. |
| mdflow_list_documents | Lists document metadata, optionally scoped to one folder or workspace; each carries its full path. |
| mdflow_get_document | Fetches one document by ID, including its body, full path, and compounded description. |
| mdflow_create_document | Creates a document inside an existing folder. |
| mdflow_rename_document | Renames a document; a duplicate title gets a numeric suffix. |
| mdflow_update_document_body | Replaces a document's markdown body. |
| mdflow_move_document | Moves a document to another folder. |
| mdflow_update_document_sharing | Turns public sharing and comments on or off. |
| mdflow_delete_document | Deletes one document. |
| mdflow_list_document_shares | Lists the people a document is privately shared with, including share IDs and pending/accepted status. |
| mdflow_add_document_share | Privately shares a document with a person by email, optionally allowing comments, and returns a private link to give them. No notification email is sent. |
| mdflow_revoke_document_share | Revokes one person's private access to a document. |
| mdflow_revoke_all_document_shares | Revokes private access to a document for everyone it is shared with. |
| mdflow_get_context | Finds topic context by ranking folder descriptions first, then titles, then fetching the best-matching markdown bodies. When a topic clearly belongs to one workspace, pick the best-matching workspace first and pass workspaceId to scope retrieval there; omit it for broad or ambiguous topics to rank across the whole account. |
Parameters use camelCase, but snake_case aliases are also accepted — e.g. mdflow_get_document takes both documentId and document_id.
Connect Claude or ChatGPT
Claude and the ChatGPT app connect to the hosted server with no token to copy. Add https://mdflow.cz/api/mcp as a custom connector and sign in — MDflow issues the access token for you.
- 1.In Claude or ChatGPT, open the connector settings and add a custom connector.
- 2.Paste
https://mdflow.cz/api/mcpas the URL and click connect. - 3.MDflow's sign-in and consent screen opens. Approve it, and the connector is ready — the mdflow tools appear in the client.
Behind the scenes the client discovers the authorization server from /.well-known/oauth-protected-resource (RFC 9728), registers itself (Dynamic Client Registration), and receives an OAuth access token — nothing is pasted by hand. OAuth is in beta and needs an MDflow Pro account, the same as a Personal Access Token. Prefer a token, or connecting a client that sends its own Authorization header? Use the Personal Access Token setup below.
Configure hosted remote server
Clients that send their own Authorization header — Claude Code, Cursor, and the OpenAI Responses API — authenticate the hosted server at https://mdflow.cz/api/mcp with a Personal Access Token instead of the OAuth sign-in above. It runs over the MCP Streamable HTTP transport and is always up to date. Create a Personal Access Token first; it starts with mdf_.
claude mcp add --transport http mdflow https://mdflow.cz/api/mcp \
--header "Authorization: Bearer mdf_your_token_here"{
"mcpServers": {
"mdflow": {
"command": "npx",
"args": [
"mcp-remote",
"https://mdflow.cz/api/mcp",
"--header",
"Authorization:Bearer mdf_your_token_here"
]
}
}
}{
"mcpServers": {
"mdflow": {
"url": "https://mdflow.cz/api/mcp",
"headers": { "Authorization": "Bearer mdf_your_token_here" }
}
}
}{
"model": "gpt-5.2",
"tools": [
{
"type": "mcp",
"server_label": "mdflow",
"server_url": "https://mdflow.cz/api/mcp",
"headers": { "Authorization": "Bearer mdf_your_token_here" }
}
],
"input": "Get information about onboarding from mdflow."
}401 with a WWW-Authenticate challenge. Tokens grant workspace-level access, including write, delete, and sharing operations, and require an MDflow Pro account.For agents: the server is stateless — no session IDs, plain JSON responses, one POST per JSON-RPC message. Rate limit is 60 requests per minute per token; 429 responses carry Retry-After in seconds. The same API is also available as REST — see the API reference and OpenAPI spec.
Local server — prerequisites
Prefer a process on your own machine? The local stdio server exposes the same tools and talks to the same API.
- ›Node.js 18+ — the server relies on the built-in
fetch. - ›A terminal with npm.
- ›An MDflow Personal Access Token (created in step 3).
Local server — install
Download the server
Grab the files into a fresh folder.
mkdir mdflow-mcp && cd mdflow-mcp
curl -O https://mdflow.cz/mcp/server.mjs
curl -O https://mdflow.cz/mcp/package.json
curl -O https://mdflow.cz/mcp/README.mdInstall dependencies
npm installPulls in @modelcontextprotocol/sdk and zod.
Create a Personal Access Token
Sign in to MDflow, open Settings, and create a token. It starts with mdf_. Copy it now — you won't see it again.
Wire it into your MCP client
Point your client at the absolute path of server.mjs. Run pwd inside the mdflow-mcp folder to get it, then replace /absolute/path/to/… below.
{
"mcpServers": {
"mdflow": {
"command": "node",
"args": ["/absolute/path/to/mdflow-mcp/server.mjs"],
"env": {
"MDFLOW_API_TOKEN": "mdf_your_token_here"
}
}
}
}[mcp_servers.mdflow]
command = "node"
args = ["/absolute/path/to/mdflow-mcp/server.mjs"]
env = { MDFLOW_API_TOKEN = "mdf_your_token_here" }{
"mcpServers": {
"mdflow": {
"command": "node",
"args": ["/absolute/path/to/mdflow-mcp/server.mjs"],
"env": { "MDFLOW_API_TOKEN": "mdf_your_token_here" }
}
}
}Restart your client and try it
Restart the app so it picks up the config, then ask:
Local server — environment variables
| Variable | Required | Default | Purpose |
|---|---|---|---|
| MDFLOW_API_TOKEN | Yes | — | Personal Access Token, usually starting with mdf_. MDFLOW_PAT is accepted as an alias. |
| MDFLOW_API_BASE_URL | No | https://mdflow.cz | Override to point at local dev, e.g. http://localhost:3000. |
How get_context ranks results
mdflow_get_context is the main agent-facing tool. Given a topic it:
- 1.Lists folders and documents.
- 2.Scores folder descriptions highest — they define the intended context for the files they contain.
- 3.Scores folder names and document titles.
- 4.Fetches only the selected document bodies.
- 5.Returns a readable markdown context block plus structured data.
Defaults to 5 documents, each truncated to 12,000 characters. Callers can request up to 10 documents, or between 500 and 50,000 characters per document.
Client compatibility notes
Claude and the ChatGPT app connect to the remote server through their custom-connector pickers with an OAuth sign-in — no token (see above). Clients that attach their own Authorization header — Claude Code, Cursor, VS Code, the OpenAI Responses API, and MCP SDK clients — connect with a Personal Access Token. Claude Desktop can also reach it through the mcp-remote stdio bridge, which requires Node.js. The local server works with clients that can launch a process — Claude Desktop, Codex, Cursor, and similar.