akiflow-toolkit

akiflow-toolkit

Unofficial MCP server for Akiflow that enables AI agents to manage tasks, projects, and calendar via the Model Context Protocol.

Category
访问服务器

README

akiflow-toolkit

Unofficial project. Not affiliated with Akiflow Inc. Uses reverse-engineered internal API. May break without notice. See DISCLAIMER.md.

Unofficial CLI and MCP server for Akiflow, enabling terminal-based task management and AI agent integration (Claude Code, Cursor, Claude Desktop).

Status

Alpha — Published to npm as akiflow-toolkit. Requires Bun 1.1+ runtime.

Planned Features

  • CLI (af): Task management from terminal — add, list, complete, schedule, projects, calendar
  • MCP Server (af --mcp): AI agent integration via Model Context Protocol
  • Auto Authentication: Extracts tokens from browser data (IndexedDB, cookies) — no manual DevTools copy
  • Token Auto-Recovery: 3-tier recovery when tokens expire (refresh → disk reload → browser re-extract)
  • Cross-browser: Chrome, Arc, Brave, Edge, Safari support (macOS)

Architecture

Key decisions are documented as Architecture Decision Records (ADRs):

  • ADR Index — All 15 ADRs
  • Highlights: Bun runtime, Hexagonal (Ports & Adapters), Outcome-first MCP Tools, semantic-release, Test Diamond

Runtime Requirement — Bun Only

akiflow-toolkitBun runtime 전용 CLI입니다. Node.js로는 실행할 수 없습니다.

  • 배포 번들이 bun:sqlite 등 Bun 네이티브 모듈을 직접 사용합니다 (Chrome cookie DB 파싱 용도).
  • shebang이 #!/usr/bin/env bun으로 고정되어 있습니다.
  • Bun은 Node.js 호환 API를 대부분 지원하므로 기능적 제약은 거의 없습니다.

Node.js 지원이 필요하면 better-sqlite3로 교체하는 별도 마이그레이션이 필요합니다 (docs/tasks/ 참고).

Installation

Prerequisites

Bun 1.1+ 설치:

# macOS / Linux
curl -fsSL https://bun.sh/install | bash

# Windows (PowerShell)
powershell -c "irm bun.sh/install.ps1 | iex"

Install CLI

bun install -g akiflow-toolkit
af --help

Platform Support

Platform Runtime CLI core MCP server Auto auth (browser) Status
macOS (arm64/x64) Bun 1.1+ ✅ Chrome/Arc/Brave/Edge/Safari Fully supported
Linux (x64/arm64) Bun 1.1+ ❌ (manual af auth only) Partial — see docs/tasks/linux-support.md
Windows (x64) Bun 1.1+ ❌ (manual af auth only) Partial — see docs/tasks/windows-support.md

macOS

자동 인증 포함 전체 기능이 동작합니다.

bun install -g akiflow-toolkit
af auth        # Chrome/Arc/Brave/Edge/Safari에서 자동 토큰 추출
af ls

Linux

CLI 및 MCP는 정상 동작합니다. Chrome cookie 자동 추출은 미구현(libsecret 미연동)이므로 수동 인증을 사용합니다.

bun install -g akiflow-toolkit

# 수동 인증: Akiflow 웹 로그인 후 DevTools → Network → request headers에서
# Bearer <JWT>를 복사해 붙여넣기
af auth

af ls

제약 사항:

  • Chrome cookie 기반 auto-auth 미지원
  • Safari 관련 기능 없음 (Apple 전용 브라우저)

Windows

CLI 및 MCP는 동작합니다. DPAPI(Windows 쿠키 암호화) 미연동으로 Chrome cookie 자동 추출은 불가능.

PowerShell에서:

bun install -g akiflow-toolkit
af auth        # 수동 입력
af ls

제약 사항:

  • Bun Windows arm64는 실험 단계 (x64 권장)
  • PowerShell용 completion 스크립트 미제공 (bash/zsh/fish만 지원)
  • Chrome cookie 기반 auto-auth 미지원

From Source (development)

git clone https://github.com/kty1965/akiflow-toolkit.git
cd akiflow-toolkit
bun install
bun run dev

Quick Start

Coming soon after initial implementation.

# Authenticate (auto-extracts from browser)
af auth

# Use CLI
af ls
af add "New task" --today

# Setup MCP for Claude Code
af setup claude-code

Verifying authentication

After af auth, you can confirm the CLI is talking to the real Akiflow API at four levels of depth:

# 1. Is a credential stored?
af auth status
# → Authenticated: active
#     source: indexeddb
#     expiresAt: 2026-04-19T13:28:30.768Z

# 2. Does the stored token actually reach Akiflow API? (diagnostic probe)
bun run scripts/mcp-api-probe.ts
# → ✓ Akiflow API reachable AND token accepted.
#   status 200 OK, body length 5MB+

# 3. Can a real MCP client spawn the server and round-trip a task?
bun run scripts/mcp-live-demo.ts
# → runs 9 steps: spawn → tools/list → auth_status → READ precheck
#   → create_task → verify inbox → complete_task → verify done
# A clean run ends with "✓ All Tier 2 E2E checks passed."

# 4. Try it from your editor
#    MCP: register `af --mcp` in ~/.claude.json and ask
#    Claude Code "오늘 할 일 보여줘".

If something fails, read docs/akiflow-token-acquisition.md — it walks through the dual auth scheme (Laravel session cookie vs OAuth JWT), the 4-tier extraction cascade (IndexedDB → Cookie → Safari → Manual), the withAuth recovery sequence, and six known failure modes with concrete fixes.

Most common remedy when auth_status shows source: cookie but API calls throw fetch failed / Header has invalid value:

osascript -e 'tell application "Google Chrome" to quit'   # release leveldb LOCK
bun run src/index.ts auth logout
bun run src/index.ts auth                                 # re-scan IndexedDB
bun run src/index.ts auth status                          # expect source: indexeddb

Documentation

Development

Prerequisites

  • Bun >= 1.0.0
  • pre-commit (brew install pre-commit or pip install pre-commit)

Setup

git clone https://github.com/kty1965/akiflow-toolkit.git
cd akiflow-toolkit
bun install
pre-commit install --install-hooks

Commands

bun run dev          # Hot reload 개발 모드
bun test             # 테스트 실행
bun run lint         # Biome 린트
bun run build        # npm 배포용 dist/ 빌드
bun run build:binary # 크로스 플랫폼 바이너리 빌드

Local MCP registration (before npm publish)

Until akiflow-toolkit lands on npm, you can still use it from Claude Code / Cursor / Claude Desktop by building a standalone binary and symlinking it into your PATH. af setup performs an atomic merge-write on the editor config, so any existing mcpServers entries are preserved.

Install

# 1. Build a self-contained binary for your platform (Bun runtime embedded)
bun run build:darwin-arm64   # Apple Silicon
# bun run build:darwin-x64   # Intel Mac
# bun run build:linux-x64    # Linux x64
# bun run build:linux-arm64  # Linux arm64

# 2. Symlink into a PATH directory (no sudo required)
mkdir -p ~/.local/bin
ln -sf "$PWD/dist/af-darwin-arm64" ~/.local/bin/af

# 3. Make sure ~/.local/bin is on PATH
echo "$PATH" | tr ':' '\n' | grep -q "$HOME/.local/bin" \
  || echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
# Open a new shell, or: source ~/.zshrc

# 4. Smoke check
af --help
af auth status               # expect: source: indexeddb, active

# 5. Register the MCP server in your AI editor
af setup claude-code         # → ~/.claude.json
# af setup cursor            # → ~/.cursor/mcp.json
# af setup claude-desktop    # → ~/Library/Application Support/Claude/... (macOS only)

# 6. Restart the editor, then try a tool call (e.g. "show me today's inbox")

When you edit source code later, only step 1 needs to run again — the symlink keeps pointing at the fresh binary.

Uninstall

# 1. Remove the akiflow entry from every editor config where it was registered
jq 'del(.mcpServers.akiflow)' ~/.claude.json > ~/.claude.json.new && mv ~/.claude.json.new ~/.claude.json
[ -f ~/.cursor/mcp.json ] && jq 'del(.mcpServers.akiflow)' ~/.cursor/mcp.json > ~/.cursor/mcp.json.new && mv ~/.cursor/mcp.json.new ~/.cursor/mcp.json
# Claude Desktop (macOS):
#   CONFIG=~/Library/Application\ Support/Claude/claude_desktop_config.json
#   jq 'del(.mcpServers.akiflow)' "$CONFIG" > "$CONFIG".new && mv "$CONFIG".new "$CONFIG"

# 2. Remove the PATH shim
rm -f ~/.local/bin/af

# 3. (Optional) Drop the compiled binaries
rm -rf dist/

# 4. (Optional) Revoke stored auth credentials
bun run src/index.ts auth logout    # or: rm ~/.config/akiflow/auth.json

# 5. Restart the editor

Disclaimer

See DISCLAIMER.md.

License

MIT © kty1965

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选