zk-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@zk-mcpsearch for notes tagged with #research and summarize their content"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
zk-mcp
zk-mcp is an MCP (Model Context Protocol) server for integrating notes managed by zk with LLMs. It enables LLMs to efficiently access and interact with knowledge bases managed under zk.
Features
Note Query: Search notes by content, tags, and complex filters
Link Analysis: Discover relationships between notes (links to, linked by, related)
Tag Management: List and filter by available tags
Note Access: Read complete note contents
Note Creation: Create new notes programmatically
Related MCP server: brainforge-mcp
Prerequisites
Any MCP client (e.g., Claude Desktop, Continue, etc.)
Installation
Clone this repository:
git clone https://github.com/koei-kaji/zk-mcp.git
cd zk-mcpInstall dependencies:
uv syncConfiguration
Add the following settings to your MCP client's servers.json:
{
"mcpServers": {
"zk": {
"alwaysAllow": [
"get_note",
"get_note_paths",
"get_linking_notes",
"get_tags",
"create_note"
],
"args": [
"--directory",
"/path/to/zk-mcp/",
"run",
"server.py"
],
"command": "uv",
"env": {
"ZK_DIR": "/path/to/your/zk-note-directory/"
}
}
}
}Important: Replace /path/to/zk-mcp/ with the actual path to this repository and /path/to/your/zk-note-directory/ with the path to your zk notes directory.
Available MCP Tools
This server provides the following MCP tools:
get_note_paths
Search for notes based on various criteria:
include_str: Filter notes containing specific strings in content or filename
include_str_operand: Logical operator (
AND/OR) for multiple string filtersexclude_str: Exclude notes containing specific strings
include_tags: Filter notes by tags
include_tags_operand: Logical operator (
AND/OR) for multiple tag filtersexclude_tags: Exclude notes with specific tags
get_linking_notes
Discover note relationships:
link_to_notes: Notes that the specified note links to
linked_by_notes: Notes that link to the specified note
related_notes: Notes that are related to the specified note
get_tags
List all available tags in the note repository.
get_note
Read the complete content of a specific note by path.
create_note
Create a new note with the specified title in an optional directory.
Development
Commands
make run- Run the MCP server in development mode withZK_DIR=.make format- Format code using ruff (imports + formatting)make lint- Run linting with ruff and type checking with mypymake test- Run all tests with pytestmake pre-commit- Run both format and lint (recommended before commits)
Package Management
uv add <package>- Add runtime dependencyuv add --dev <package>- Add development dependencyuv run <command>- Run command in virtual environment
Architecture
The server is built using:
FastMCP: MCP server implementation
Pydantic: Data validation and serialization
zk CLI: Backend integration with zk note system
All tools return JSON responses using Pydantic models for type safety and validation.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
5 toolscreate_noteA
Create a new note with the specified title.
Args: title (str): Title of the note to create directory (str): Directory to create the note in (optional)
Returns: str: JSON string containing path information for the created note
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| directory | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It mentions return format (JSON string with path info) but lacks details on side effects, permissions, or error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (2 sentences plus Args/Returns) and well-structured, with no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description adequately covers purpose, parameters, and return value. However, it could mention the default location if no directory is specified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description compensates by listing both parameters with types and noting 'directory' as optional. This adds value beyond the raw schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'create' and the resource 'note' with a specified title. It distinguishes from sibling tools (all getters) by indicating write operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide explicit guidance on when to use this tool versus alternatives. However, the sibling tools are all read-only, so the use case is implicitly clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_linking_notesA
Get all linking information related to the specified note.
This tool searches for notes with the following three types of link relationships to a specific note path:
Notes that the specified note links to (link_to)
Notes that link to the specified note (linked_by)
Notes that are related to the specified note (related)
Args: path (str): Path to the note file to get linking information for
Returns: str: JSON string containing linking information. Includes note lists for three different link types (link_to_notes, linked_by_notes, related_notes).
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description explains the three link types and return format, which is adequate given no annotations. However, it does not disclose potential side effects (none expected), permissions, or error handling (e.g., if path is invalid). Read-only nature is implied but not stated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-organized: a main sentence, a bullet list of link types, and an explicit Args/Returns section. Every sentence adds value, and there is no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers purpose, parameters, and return format adequately for a simple lookup tool. Minor missing details (e.g., error behavior) could be added, but overall it is complete enough for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description compensates by explaining that 'path' is the path to a note file. This adds meaningful context beyond the schema's bare title and type.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves linking information for a note, specifying three distinct relationship types (link_to, linked_by, related). It differentiates itself from sibling tools like get_note and get_note_paths by focusing on link relationships.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implicitly defines when to use: for retrieving link relationships of a note. It does not explicitly exclude other scenarios or compare to siblings, but the purpose is clear enough that an agent can infer appropriate usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_noteA
Read and return the contents of the note at the specified path.
Args: path (str): Path to the note file to read
Returns: str: The note content
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Describes a read-only operation without side effects, which is appropriate for a simple read. However, no annotations are provided, and the description does not disclose error handling or permissions, but it is not misleading.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise: one sentence for purpose, then structured Args/Returns. Every sentence adds value with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter read tool with no output schema, the description covers purpose, parameter, and return value completely. No additional context needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description explains the 'path' parameter's purpose ('Path to the note file to read') beyond the schema's title-only definition. Schema description coverage is 0%, so the description carries the full burden and adds clear meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'read' and 'return', the resource 'note contents', and how 'at the specified path'. It distinguishes from siblings like 'create_note' (write) and 'get_note_paths' (list).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use vs alternatives, but the context of siblings implies this is for reading a specific note. Lacks 'when not to use' or 'use X instead for Y'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_note_pathsA
Get a list of note paths that match the filter criteria using zk CLI.
Args: include_str (list[str]): Filter notes by strings contained in content or filename include_str_operand (Literal['AND', 'OR']): Logical operator applied to multiple include_str filters ('AND' or 'OR') exclude_str (list[str]): Exclude notes containing these strings in content or filename include_tags (list[str]): Filter to notes with specified tags include_tags_operand (Literal['AND', 'OR']): Logical operator applied to multiple include_tags ('AND' or 'OR') exclude_tags (list[str]): Exclude notes with specified tags
Returns: str: JSON string containing a list of note file paths and title information matching the filter criteria.
| Name | Required | Description | Default |
|---|---|---|---|
| include_str | No | ||
| include_str_operand | No | AND | |
| exclude_str | No | ||
| include_tags | No | ||
| include_tags_operand | No | AND | |
| exclude_tags | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It explains return format (JSON string of paths and titles) and filter logic, but does not disclose potential behaviors like authentication, rate limits, or performance.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Starts with a clear purpose sentence, followed by a concise bullet-style list of arguments. No redundant information; every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 6 parameters, no required params, and no output schema, the description adequately covers filtering and return format. However, it could mention edge cases (e.g., empty results) or example usage for completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description provides thorough explanations for each parameter, including operand options and filter semantics, fully compensating for the schema's lack of detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it gets note paths using filter criteria (verb+resource). However, it does not explicitly differentiate from sibling tools like get_note or get_tags, though the purpose is distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. It merely describes filtering parameters without explaining context or exclusionary criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_tagsD
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v0.1.0- First observed
create_note - First observed
get_linking_notes - First observed
get_note - First observed
get_note_paths - First observed
get_tags
TDQS
Most tools have distinct purposes (create, read, search, link retrieval), but the empty description for get_tags introduces ambiguity about its exact function, slightly reducing clarity.
All tool names follow a consistent verb_noun pattern using snake_case (e.g., create_note, get_note_paths). The naming is predictable and uniform across the set.
Five tools is a reasonable number for a focused knowledge management server, covering creation, retrieval, search, and linking. It avoids being too sparse or bloated.
Core operations like create and read are covered, but update and delete are missing, limiting full workflow support. The get_tags tool's missing description further undermines completeness.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Google Keep-style notes app with an MCP server for AI agents to read/write notes.
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server for managing Obsidian-style note vaults, providing tools for full-text search, note creation, and backlink tracking. It enables users to navigate, structure, and update their personal knowledge base through natural language.9MIT
- AlicenseAqualityDmaintenanceAn MCP server that transforms markdown notes into an AI-powered knowledge graph. It enables LLM clients to explore, analyze, and diagnose knowledge graphs through tools for node explanation, path finding, causal chain analysis, and wiki health reporting.5MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides Claude and other MCP clients with persistent memory through a Zettelkasten knowledge base of interconnected markdown notes. It enables LLMs to create, search, link, and reference atomic notes across sessions without requiring manual copy-pasting.MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for zk note management enabling note search, creation, and link analysis via the zk command-line tool.1MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/koei-kaji/zk-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server