You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MCP server for wflow — Czech accounting automation platform for document management, expense tracking, approvals, storage, and organizational workflows.
78 tools across 10 categories covering the entire wflow API. OAuth2 client credentials authentication, response caching with configurable TTL, retry with exponential backoff, and actionable error messages.
Requirements
Node.js 20+
wflow API credentials (OAuth2 client ID and secret) — request from wflow support or create via the wflow admin panel
Installation
git clone https://github.com/hlebtkachenko/wflow-mcp.git
cd wflow-mcp
npm ci
npm run build
GET responses are cached in-memory with a configurable TTL (default 120 seconds). Mutations (PUT, POST, PATCH, DELETE) automatically invalidate related cache entries. Set WFLOW_CACHE_TTL=0 to disable caching.
Rate Limit Handling
When the API returns HTTP 429, the server waits using the Retry-After header value or exponential backoff, then retries automatically up to WFLOW_MAX_RETRIES times.
Security
OAuth2 tokens are refreshed automatically and never logged
API credentials are read from environment variables only — never stored on disk
All API paths are validated against injection patterns (.., #)
Error messages are truncated to 500 characters to prevent data leaks
Zod validates every tool parameter before API calls
Docker image runs as non-root node user
30-second timeout on all HTTP requests
Architecture
src/
index.ts — Entry point, env vars, server setup
wflow-client.ts — HTTP client with OAuth2, retry, caching
cache.ts — TTL-based in-memory response cache
utils.ts — textResult / errorResult MCP helpers
types.ts — Shared TypeScript interfaces
tools/
documents.ts — Document CRUD and lifecycle (11 tools)
document-files.ts — Document file operations (5 tools)
document-extras.ts — Approvals, comments, links, rights (9 tools)
properties.ts — Custom property definitions and values (10 tools)
storage.ts — Storage files, folders, rights (14 tools)
registers.ts — All 24 register types (3 tools)
organization.ts — Org, users, roles, teams (15 tools)
config.ts — Doc types, approval templates, webhooks (12 tools)
api.ts — Raw API escape hatch (1 tool)