> 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 connects in one click from its Connectors Directory and ChatGPT 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). Working in a Team account? Its shared workspaces have their own Team MCP server.
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; clearing it requires explicit confirmEmpty=true. |
| 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 — you sign in and MDflow issues the access token for you.
Connect Claude in one click
MDflow is in Claude's Connectors Directory. Click Connect to Claude and sign in to MDflow — no URL to paste, no token to create. One connection works in claude.ai, the desktop and mobile apps, and Claude Code. Requires MDflow Pro.
ChatGPT adds https://mdflow.cz/api/mcp as a custom connector:
- 1.In 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 needs an MDflow Pro account, the same as a Personal Access Token (ChatGPT's sign-in is in beta). 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 — 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. For Claude Code and Claude Desktop the token configs below are the legacy path; the Claude connector needs no token. 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.
Team MCP server
An MDflow Team account is a shared tenant with its own members, roles, workspaces, folders, and markdown documents, separate from any member's personal workspaces. It has its own hosted MCP server at https://mdflow.cz/api/team/mcp — the same Streamable HTTP transport as the personal server, stateless, one POST per JSON-RPC message — with 16 mdflow_team_* tools. Personal tokens are rejected here, and Team tokens are rejected on the personal server.
Team access tokens
Any member creates a named token on the Team's API Access page (/teams/<accountId>/api-access). It starts with mdt_ and is shown once. A token is bound to one Team account, granted only the workspaces picked when it was created, and capped at read-only or read-and-write. Every request re-checks the creator's live membership, role, and per-workspace permission and the Team account's state: a read cap can never write, a write token writes only where its creator currently has write access and the account is active, and removing a member deletes their tokens. Eligibility comes from the Team seat — no MDflow Pro is needed. Every write is attributed to the creator in the Team audit feed.
What it exposes
| Tool | What it does |
|---|---|
| mdflow_team_list_workspaces | Lists the Team workspaces the token can reach, each with its effective access_level (read or write) and the Team account state. Start here. |
| mdflow_team_list_folders | Lists folders across the readable Team workspaces; descriptions are the primary context signal. Optionally filter to one workspace. |
| mdflow_team_get_folder | Gets one Team folder with its description, parent, and workspace. |
| mdflow_team_create_folder | Creates a folder in a writable Team workspace. A top-level folder needs workspaceId — MDflow never guesses a workspace; a subfolder inherits its parent's. |
| mdflow_team_rename_folder | Renames a Team folder; a duplicate name gets a numeric suffix. |
| mdflow_team_update_folder_description | Replaces a Team folder's description. |
| mdflow_team_move_folder | Reparents a Team folder within its workspace, or pass parentId null for the top level. Folders never move across workspaces. |
| mdflow_team_delete_folder | Permanently deletes a Team folder with every subfolder and document inside it. |
| mdflow_team_list_documents | Lists Team document metadata (no bodies), optionally scoped to one workspace or one folder. |
| mdflow_team_get_document | Fetches one Team document by ID, including its markdown body. |
| mdflow_team_create_document | Creates a Team document in a folder (folderId) or at a workspace root (workspaceId). Duplicate titles get a numeric suffix. |
| mdflow_team_rename_document | Retitles a Team document; a duplicate title gets a numeric suffix. |
| mdflow_team_update_document_body | Replaces a Team document's entire markdown body; clearing it requires explicit confirmEmpty=true. |
| mdflow_team_move_document | Moves a Team document to another folder in the same workspace, or to the workspace root with folderId null. |
| mdflow_team_delete_document | Permanently deletes one Team document. |
| mdflow_team_get_context | Finds topic context across the readable Team workspaces by ranking folder descriptions first, then names and titles, then fetching the best-matching bodies in one batched request. Pass workspaceId to stay inside one workspace. |
Same conventions as the personal tools: camelCase parameters with snake_case aliases, documents up to 500 KiB, folder descriptions up to 5000 characters, automatic numeric suffixes for duplicate names, and mdflow_team_get_context defaults of 5 documents at 12,000 characters each. Documents can live at a workspace root (folderId null), and creating a top-level folder or root document requires an explicit workspaceId. There is no sharing tool set — Team sharing is managed in the app.
Connect a client
The Team server accepts only Team access tokens today, so it works with clients that send their own Authorization header — Claude Code, Cursor, Codex, the OpenAI Responses API, MCP SDK clients, and Claude Desktop through mcp-remote. The MDflow connector in Claude's directory and the ChatGPT connector reach personal workspaces only; per-user OAuth for Team workspaces is a planned later phase.
claude mcp add --transport http mdflow-team https://mdflow.cz/api/team/mcp \
--header "Authorization: Bearer mdt_your_team_token"{
"mcpServers": {
"mdflow-team": {
"url": "https://mdflow.cz/api/team/mcp",
"headers": { "Authorization": "Bearer mdt_your_team_token" }
}
}
}{
"mcpServers": {
"mdflow-team": {
"command": "npx",
"args": [
"mcp-remote",
"https://mdflow.cz/api/team/mcp",
"--header",
"Authorization:Bearer mdt_your_team_token"
]
}
}
}{
"model": "gpt-5.2",
"tools": [
{
"type": "mcp",
"server_label": "mdflow_team",
"server_url": "https://mdflow.cz/api/team/mcp",
"headers": { "Authorization": "Bearer mdt_your_team_token" }
}
],
"input": "Summarize our incident playbooks from the mdflow team workspace."
}401 with a WWW-Authenticate: Bearer realm="MDflow Team" challenge.For agents: rate limit is 60 requests per minute per token, with Retry-After on 429. A 401 means the token is invalid or revoked — tokens also stop working when their creator leaves the team. A 403 means the operation exceeds the token's effective access: the token or the creator's workspace permission is read-only, or the Team account is not active. There is no local stdio variant of the Team server. The tools are HTTP clients over the Team REST API, which is described in the same OpenAPI spec.
Client compatibility notes
Claude connects through the MDflow connector in its Connectors Directory, and that one connection also serves the Claude desktop and mobile apps and Claude Code. The ChatGPT app connects through its custom-connector picker. Both use an OAuth sign-in — no token (see above). Clients that attach their own Authorization header — Cursor, VS Code, the OpenAI Responses API, and MCP SDK clients — connect with a Personal Access Token, as do the legacy Claude Code and Claude Desktop configs. Claude Desktop's config can 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.