Tana Codemode
FreeNot checkedEnables dynamic TypeScript code execution against Tana's Local API for flexible knowledge management operations including workspaces, nodes, tags, search, and f
About
Enables dynamic TypeScript code execution against Tana's Local API for flexible knowledge management operations including workspaces, nodes, tags, search, and field management.
README
Codemode MCP server for Tana. AI writes TypeScript that executes directly against the Tana Local API.
Requires: Tana Desktop with Local API enabled + an API token (Settings → API).
Install
Binary — download from GitHub Releases, chmod +x, run.
npm (Node.js ≥ 20):
npm install -g tana-mcp-codemode
From source (Bun): git clone → bun install → bun run src/entry-bun.ts
Setup
Run the interactive setup script — detects your installation, prompts for credentials, and configures Claude Code and/or Claude Desktop automatically:
bun run setup
# or for team-shared config:
bun run setup --scope project
Manual MCP Configuration
{
"mcpServers": {
"tana": {
"command": "tana-mcp-codemode",
"env": {
"TANA_API_TOKEN": "your-token-here",
"MAIN_TANA_WORKSPACE": "My Workspace"
}
}
}
}
For binary: set command to the binary path. For source: "command": "bun", "args": ["run", "/path/to/src/entry-bun.ts"].
Environment Variables
| Variable | Default | Description |
|---|---|---|
TANA_API_TOKEN |
required | Bearer token from Tana Desktop |
TANA_API_URL |
http://127.0.0.1:8262 |
Tana Local API URL |
MAIN_TANA_WORKSPACE |
— | Default workspace name or ID |
TANA_SEARCH_WORKSPACES |
— | Comma-separated workspaces for search scope |
TANA_TIMEOUT |
10000 |
Request timeout in ms |
TANA_HISTORY_PATH |
platform default | Custom SQLite history path |
Usage Examples
// Search nodes
const results = await tana.nodes.search("project ideas", {
workspaceIds: [tana.workspace.id]
});
// Import with tags and fields
await tana.import(tana.workspace.id, `
%%tana%%
- Meeting notes #meeting
- Date:: [[2024-01-15]]
- Attendees:: Alice, Bob
`);
API Reference
| Namespace | Methods |
|---|---|
tana.workspace |
pre-resolved default workspace |
tana.workspaces |
list() |
tana.nodes |
search(), read(), getChildren(), edit(), move(), trash(), check(), uncheck(), open() |
tana.tags |
listAll(), getSchema(), create(), modify(), addField(), setCheckbox() |
tana.fields |
setOption(), setContent(), getFieldOptions() |
tana.calendar |
getOrCreate() |
tana.import() |
import Tana Paste content |
tana.health() |
API health check |
Development
bun run start # MCP server
bun run dev # watch mode
bun run test # tests
bun run build # Node.js dist (tsup)
bun run build:binary # self-contained binary
bun run debug # debug UI at :3333
License
MIT
Install Tana Codemode in Claude Desktop, Claude Code & Cursor
unyly install tana-codemodeInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add tana-codemode -- npx -y tana-mcp-codemodeStep-by-step: how to install Tana Codemode
FAQ
Is Tana Codemode MCP free?
Yes, Tana Codemode MCP is free — one-click install via Unyly at no cost.
Does Tana Codemode need an API key?
No, Tana Codemode runs without API keys or environment variables.
Is Tana Codemode hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Tana Codemode in Claude Desktop, Claude Code or Cursor?
Open Tana Codemode on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Tana Codemode with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
