Tana MCP Codemode
T

Tana MCP Codemode

A code - mode - based Tana knowledge management MCP server. AI interacts with the Tana local API by writing TypeScript code, supporting operations such as workspaces, nodes, tags, fields, calendars, and imports.
2.5 points
6.3K

What is the Tana MCP Server?

The Tana MCP server is an innovative AI assistant tool that adopts the design concept of 'code mode'. Different from traditional structured API calls, AI can directly write TypeScript code to operate your Tana knowledge base. This means that AI can think like a developer and write complex logic to handle your notes, tasks, tags, and calendar events.

How to use the Tana MCP Server?

It's very simple to use: First, install the server and configure your Tana API token. Then, enable MCP integration in your AI assistant (such as Claude Desktop, Cursor, etc.). After that, you can directly let AI write code to operate Tana, such as searching for specific notes, creating new tasks, and batch - editing content.

Use cases

The Tana MCP server is particularly suitable for scenarios that require complex knowledge base operations: batch processing of a large number of notes, automating repetitive tasks, performing advanced search queries, creating intelligent templates, managing project tasks, organizing the knowledge base structure, etc. Whether it's personal knowledge management or team collaboration, it can significantly improve efficiency.

Main Features

Code Mode Design
AI directly writes and executes TypeScript code instead of simple API calls. This enables AI to handle complex logic and conditional judgments, providing more flexible and powerful automation capabilities.
Full Tana API Support
Supports all core functions of the Tana Local API: workspace management, node operations, tag management, field settings, calendar views, and content import. AI can fully control your knowledge base.
Top - level await Support
Code can directly use the await syntax without being wrapped in an asynchronous function. This makes the code more concise and readable, and AI can write asynchronous operations more naturally.
Timeout Protection Mechanism
Automatically limits the code execution time to 10 seconds to prevent infinite loops or long - running operations from blocking the system. Ensures system stability and response speed.
Script Execution History
All executed code will be saved in the SQLite database, including code content, output results, error information, and execution time. It's convenient for debugging, auditing, and reuse.
Intelligent Retry Logic
Built - in exponential backoff retry mechanism to automatically handle temporary network or API errors. Improves the success rate and reliability of operations.
Visual Debugging Interface
Provides a WebSocket - based debugging dashboard that can test code in real - time, view execution results, and analyze performance data. Supports workflow progress tracking and error diagnosis.
Advantages
๐Ÿ’ก Extremely flexible: AI can write arbitrarily complex logic without being restricted by predefined tools
๐Ÿš€ Highly efficient automation: Execute multiple operations at once, reducing manual steps
๐Ÿ”ง Powerful debugging: Complete execution history and visual debugging tools
๐Ÿ›ก๏ธ Secure and reliable: Timeout protection, error retry, and operation records
๐Ÿ“Š Performance optimization: The code mode is more efficient than traditional API calls
๐Ÿ”„ Easy to integrate: Supports all mainstream MCP clients (Claude, Cursor, etc.)
Limitations
โš ๏ธ Requires technical understanding: Users need a basic understanding of code logic (although AI will handle the writing)
๐Ÿ”‘ Depends on Tana Desktop: Tana Desktop must be installed and the Local API must be enabled
โš™๏ธ Configuration steps: Need to obtain and configure the API token
๐Ÿ’ป Runtime environment: Requires the Bun runtime environment
๐Ÿ“ฑ Mobile limitations: Currently mainly for desktop use scenarios

How to Use

Install the Bun Runtime
The Tana MCP server is built on Bun. First, you need to install the Bun runtime environment.
Install the Tana MCP Server
Use the Bun package manager to globally install the server.
Get the Tana API Token
In Tana Desktop, open Settings โ†’ API โ†’ Generate Token, and copy the generated Bearer token.
Configure the MCP Client
Add the Tana MCP server to the configuration file of your AI assistant (such as Claude Desktop).
Restart and Start Using
Restart your AI assistant, and now you can let AI write code to operate Tana!

Usage Examples

Intelligent Task Management
Let AI automatically organize your to - do items: search for all unfinished tasks, categorize them by project, update the status, and create a weekly report.
Knowledge Base Batch Organization
Batch process a large number of notes: add standard templates to specific types of notes, unify tag formats, and clean up duplicate content.
Project Progress Tracking
Automatically generate project status reports: collect all relevant tasks and notes, analyze the completion status, and identify bottlenecks.
Intelligent Content Import
Intelligently import external content into Tana: parse the text, automatically add appropriate tags, and create associated links.

Frequently Asked Questions

Do I need to know programming to use this tool?
Is this tool safe? Will it accidentally delete my data?
Does it support the mobile version of Tana?
What should I do if the code execution fails?
Can I operate multiple workspaces at the same time?
How long will the execution history be saved?
Which MCP clients are supported?
Is there a time limit for code execution?

Related Resources

Tana Official Website
The official website of the Tana knowledge management tool. Learn about core functions and the latest developments.
GitHub Repository
The source code and latest version of the Tana MCP server.
Bun Runtime
A fast all - in - one JavaScript runtime, the runtime environment of the Tana MCP server.
MCP Protocol Documentation
The official specification document of the Model Context Protocol.
Tana API Documentation
The complete documentation and examples of the Tana Local API.
Debugging Interface Demo
The local debugging server interface (available after startup).

Installation

Copy the following command to your Client for configuration
Note: Your key is sensitive information, do not share it with anyone.

Alternatives

A
Airweave
Airweave is an open - source context retrieval layer for AI agents and RAG systems. It connects and synchronizes data from various applications, tools, and databases, and provides relevant, real - time, multi - source contextual information to AI agents through a unified search interface.
Python
7.0K
5 points
V
Vestige
Vestige is an AI memory engine based on cognitive science. By implementing 29 neuroscience modules such as prediction error gating, FSRS - 6 spaced repetition, and memory dreaming, it provides long - term memory capabilities for AI. It includes a 3D visualization dashboard and 21 MCP tools, runs completely locally, and does not require the cloud.
Rust
4.5K
4.5 points
H
Haiku.rag
Haiku RAG is an intelligent retrieval - augmented generation system built on LanceDB, Pydantic AI, and Docling. It supports hybrid search, re - ranking, Q&A agents, multi - agent research processes, and provides local - first document processing and MCP server integration.
Python
10.2K
5 points
C
Cipher
Cipher is an open-source memory layer framework designed for programming AI agents. It integrates with various IDEs and AI coding assistants through the MCP protocol, providing core functions such as automatic memory generation, team memory sharing, and dual-system memory management.
TypeScript
0
5 points
A
Apple Notes MCP
A server that provides local Apple Notes database access for the Claude desktop client, supporting reading and searching of note content.
Python
13.6K
4.3 points
M
MCP Server Weread
The WeRead MCP Server is a lightweight service that bridges WeRead data and AI clients, enabling in - depth interaction between reading notes and AI.
TypeScript
15.2K
4 points
M
MCP Notion Server
Certified
The Notion MCP Server is a middleware service that connects the Notion API with the LLM, optimizing interaction efficiency through Markdown conversion.
TypeScript
17.8K
5 points
M
MCP Obsidian
This project is an MCP server used to interact with the Obsidian note application through the Local REST API plugin of Obsidian. It provides various tools to operate and manage files in Obsidian, including listing files, retrieving file content, searching, modifying content, and deleting files.
Python
19.2K
5 points
G
Gitlab MCP Server
Certified
The GitLab MCP server is a project based on the Model Context Protocol that provides a comprehensive toolset for interacting with GitLab accounts, including code review, merge request management, CI/CD configuration, and other functions.
TypeScript
24.4K
4.3 points
N
Notion Api MCP
Certified
A Python-based MCP Server that provides advanced to-do list management and content organization functions through the Notion API, enabling seamless integration between AI models and Notion.
Python
20.4K
4.5 points
D
Duckduckgo MCP Server
Certified
The DuckDuckGo Search MCP Server provides web search and content scraping services for LLMs such as Claude.
Python
71.7K
4.3 points
M
Markdownify MCP
Markdownify is a multi-functional file conversion service that supports converting multiple formats such as PDFs, images, audio, and web page content into Markdown format.
TypeScript
35.3K
5 points
U
Unity
Certified
UnityMCP is a Unity editor plugin that implements the Model Context Protocol (MCP), providing seamless integration between Unity and AI assistants, including real - time state monitoring, remote command execution, and log functions.
C#
32.1K
5 points
F
Figma Context MCP
Framelink Figma MCP Server is a server that provides access to Figma design data for AI programming tools (such as Cursor). By simplifying the Figma API response, it helps AI more accurately achieve one - click conversion from design to code.
TypeScript
65.4K
4.5 points
G
Gmail MCP Server
A Gmail automatic authentication MCP server designed for Claude Desktop, supporting Gmail management through natural language interaction, including complete functions such as sending emails, label management, and batch operations.
TypeScript
22.0K
4.5 points
C
Context7
Context7 MCP is a service that provides real-time, version-specific documentation and code examples for AI programming assistants. It is directly integrated into prompts through the Model Context Protocol to solve the problem of LLMs using outdated information.
TypeScript
98.1K
4.7 points