Enables AI-assisted task management by extracting and querying Obsidian Tasks from markdown files, with support for status mapping, date filters, and Obsidian Tasks query syntax.
SaferSkills independently audited Optimike Obsidian Tasks MCP (MCP Server) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server for extracting and querying Obsidian Tasks from markdown files. Designed to work with MCP clients (Claude, Codex, IDEs, etc.) to enable AI‑assisted task management.
French version: README.fr.md
<vault>/.obsidian/plugins/obsidian-tasks/data.jsonnpx optimike-obsidian-tasks-mcp /path/to/obsidian/vault[due:: 2024-01-01], etc.)This server relies on the Obsidian Tasks plugin: https://github.com/obsidian-tasks-group/obsidian-tasks
This server reads your Tasks plugin settings (statuses, presets, global filter) from:
<vault>/.obsidian/plugins/obsidian-tasks/data.jsonMake sure that file reflects your current Tasks configuration.
This MCP server provides the following tools:
Extracts all tasks from markdown files in a directory, recursively scanning through subfolders.
Input Parameters:
path (string, optional): Directory to scan. Defaults to the vault root.includePaths (string[], optional): Only include paths containing any of these substrings.excludePaths (string[], optional): Exclude paths containing any of these substrings.includeNonTasks (boolean, optional): Include NON_TASK statuses.includeFileMetadata (boolean, optional): Include file created/modified dates.includeMetaDates (boolean, optional): Include frontmatter meta dates (e.g., création/modification).metaFallbackToFile (boolean, optional, default true): If meta dates are missing, fall back to file dates.applyGlobalFilter (boolean, optional): Apply Tasks globalFilter.responseFormat ("json" | "markdown", optional): Output format.responseLimit (number, optional): Limit number of tasks returned.useCache (boolean, optional, default true): Cache per-file parsing.Returns: A JSON array of task objects, each containing:
{
"id": "string", // Unique identifier (filepath:linenumber)
"description": "string", // Full text description of the task
"status": "complete" | "incomplete" | "cancelled" | "in_progress" | "non_task",
"statusName": "string", // Optional - status name from Tasks config
"statusType": "string", // Optional - TODO | DONE | IN_PROGRESS | CANCELLED | NON_TASK
"filePath": "string", // Path to the file containing the task
"lineNumber": "number", // Line number in the file
"tags": ["string"], // Array of tags found in the task
"dueDate": "string", // Optional - YYYY-MM-DD format
"scheduledDate": "string", // Optional - YYYY-MM-DD format
"startDate": "string", // Optional - YYYY-MM-DD format
"createdDate": "string", // Optional - YYYY-MM-DD format
"doneDate": "string", // Optional - YYYY-MM-DD format
"cancelledDate": "string", // Optional - YYYY-MM-DD format
"metaCreatedDate": "string", // Optional - from frontmatter
"metaModifiedDate": "string", // Optional - from frontmatter
"fileCreatedDate": "string", // Optional - filesystem
"fileModifiedDate": "string", // Optional - filesystem
"priority": "string", // Optional - "high", "medium", or "low"
"recurrence": "string" // Optional - recurrence rule
}Searches for tasks based on Obsidian Tasks query syntax. Applies multiple filters to find matching tasks.
Input Parameters:
path (string, optional): Directory to scan. Defaults to the vault root.query (string, required): Tasks query. Each line is treated as a filter.queryFilePath (string, optional): Used to resolve {{query.file.*}} placeholders.list_all_tasks (include/exclude, meta dates, global filter, etc.)Returns: A JSON array of task objects that match the query, with the same structure as list_all_tasks.
Supported Query Syntax (subset + extras):
done / not done (aligned with Tasks semantics)status.type is TODO|DONE|IN_PROGRESS|CANCELLED|NON_TASKstatus.name is "In Progress"due|scheduled|start|created on|before|after YYYY-MM-DDdue|scheduled|start|created on or before|on or after <date>today, tomorrow, yesterday, this week, next week, last week, aujourd'hui, demain, hier, cette semaine, semaine prochainedue in next 7 daysmeta created before 2026-01-01, file modified after 2025-12-31no tags, has tagstag include #tag / tag do not include #tagpath includes string, path does not include stringfolder includes string, filename includes stringdescription includes string - Tasks with descriptions containing "string"description does not include string - Tasks with descriptions not containing "string"priority is high - Tasks with high prioritypriority is medium - Tasks with medium prioritypriority is low - Tasks with low prioritypriority is none - Tasks with no priorityExample Query:
not done
due before 2025-05-01
tag include #workThis would return all incomplete tasks due before May 1, 2025, that have the #work tag.
From npm (recommended):
# Install globally
npm install -g optimike-obsidian-tasks-mcp
# Or use directly with npx without installing
npx optimike-obsidian-tasks-mcp /path/to/obsidian/vaultFrom source:
git clone https://github.com/optimikelabs/optimike-obsidian-tasks-mcp.git
cd optimike-obsidian-tasks-mcp
npm install
npm run buildUsing npm package (recommended):
# If installed globally
optimike-obsidian-tasks-mcp /path/to/obsidian/vault
# Or with npx (no installation required)
npx optimike-obsidian-tasks-mcp /path/to/obsidian/vaultFrom source:
node dist/index.js /path/to/obsidian/vaultYou can specify multiple directories:
npx optimike-obsidian-tasks-mcp /path/to/obsidian/vault /another/directoryThe server also supports Streamable HTTP transport.
MCP_TRANSPORT_TYPE=http MCP_HTTP_HOST=127.0.0.1 MCP_HTTP_PORT=3011 \
npx optimike-obsidian-tasks-mcp /path/to/obsidian/vaultSession mode (default stateful):
MCP_HTTP_SESSION_MODE=stateful (auto sessionId)MCP_HTTP_SESSION_MODE=stateless (no session)To avoid scanning too much, use includePaths/excludePaths in MCP calls, or set defaults via env vars:
MCP_TASKS_INCLUDE_PATHS (CSV): vault-relative paths, e.g. Efforts/Projets,Calendrier/NOTES PÉRIODIQUESMCP_TASKS_EXCLUDE_PATHS (CSV)MCP_TASKS_MAX_FILES (number)MCP_TASKS_CONCURRENCY (number, default 8)To run the test suite:
npm testSee TESTING.md for detailed information about the test suite.
npm run inspect:stdio
# or
npm run inspect:httpAdd this configuration to a client that supports MCP:
{
"mcpServers": {
"optimike-obsidian-tasks": {
"command": "npx",
"args": [
"optimike-obsidian-tasks-mcp",
"/path/to/obsidian/vault"
]
}
}
}If you installed from source:
{
"mcpServers": {
"optimike-obsidian-tasks": {
"command": "node",
"args": [
"/path/to/optimike-obsidian-tasks-mcp/dist/index.js",
"/path/to/obsidian/vault"
]
}
}
}Build the Docker image:
docker build -t optimike-obsidian-tasks-mcp .Run with Docker:
docker run -i --rm --mount type=bind,src=/path/to/obsidian/vault,dst=/projects/vault optimike-obsidian-tasks-mcp /projectsClaude Desktop configuration:
{
"mcpServers": {
"optimike-obsidian-tasks": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--mount", "type=bind,src=/path/to/obsidian/vault,dst=/projects/vault",
"optimike-obsidian-tasks-mcp",
"/projects"
]
}
}
}The server recognizes the following Obsidian Tasks format:
- [ ] Task description- [x] Task description🗓️ YYYY-MM-DD📅 YYYY-MM-DD⏳ YYYY-MM-DD🛫 YYYY-MM-DD➕ YYYY-MM-DD⏫ (high), 🔼 (medium), 🔽 (low)🔁 every day/week/month/etc.#tag1 #tag2Example task: - [ ] Complete project report 🗓️ 2025-05-01 ⏳ 2025-04-25 #work #report ⏫
MIT License
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.