AIクライアントからkakikoのタスクを操作する(MCP連携)
Claude DesktopやClaude CodeなどのAIクライアントからkakikoのタスクやルーティンを操作するためのMCPサーバーの設定方法を説明します。
この記事では、MCPサーバーを設定し、AIクライアントからkakikoのタスク・ルーティンを操作する方法を説明します。
MCPサーバーとは
MCP(Model Context Protocol)サーバーは、AIクライアント(Claude Desktop、Claude Code、Cursorなど)からkakikoのデータに直接アクセスするための仕組みです。
MCPサーバーを設定すると、AIとの会話の中で以下の操作が可能になります。
- タスクの検索・作成・更新・削除
- ルーティン(習慣)の一覧取得
- ダッシュボード情報(今日の期限タスク数、期限切れ数など)の取得
前提条件
- Node.js 18.0.0 以上がインストールされていること
- kakikoデスクトップアプリがインストール済みで、一度以上起動していること
セットアップ手順
Claude Desktop
- Claude Desktopの設定ファイルを開きます。
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
- 以下の内容を追加します。
{
"mcpServers": {
"kakiko": {
"command": "npx",
"args": ["-y", "@frater/kakiko-mcp-server"]
}
}
}
- Claude Desktopを再起動します。
Windows環境では cmd 経由で実行します。
{
"mcpServers": {
"kakiko": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@frater/kakiko-mcp-server"]
}
}
}
Claude Code
- プロジェクトの
.mcp.jsonに以下を追加します。
{
"mcpServers": {
"kakiko": {
"command": "npx",
"args": ["-y", "@frater/kakiko-mcp-server"]
}
}
}
Cursor
- Cursor Settings を開きます。
- 「MCP Servers」セクションに以下を追加します。
{
"kakiko": {
"command": "npx",
"args": ["-y", "@frater/kakiko-mcp-server"]
}
}
データベースパスの指定
MCPサーバーはkakikoのSQLiteデータベースのパスを自動検出します。通常は設定不要です。
自動検出されるデフォルトパスは以下のとおりです。
| OS | パス |
|---|---|
| macOS | ~/Library/Application Support/io.kakiko/kakiko.db |
| Windows | %APPDATA%\io.kakiko\kakiko.db |
| Linux | ~/.local/share/io.kakiko/kakiko.db |
データベースの保存場所を変更している場合は、--db オプションで明示的に指定します。
{
"mcpServers": {
"kakiko": {
"command": "npx",
"args": ["-y", "@frater/kakiko-mcp-server", "--db", "/path/to/kakiko.db"]
}
}
}
読み取り専用モード
タスクの作成・更新・削除を無効にし、読み取り操作のみ許可するには --readonly オプションを追加します。
{
"mcpServers": {
"kakiko": {
"command": "npx",
"args": ["-y", "@frater/kakiko-mcp-server", "--readonly"]
}
}
}
読み取り専用モードでは、tasks_mutate ツールが無効になります。
AIクライアントからの操作例
タスクの検索
AIに「今日期限のタスクを教えて」と伝えると、tasks_query ツールでタスクを検索します。ステータス、タグ、期限、テキストで絞り込みが可能です。
タスクの作成
AIに「明日までに資料を作成するタスクを追加して」と伝えると、tasks_mutate ツールでタスクを作成します。タイトル、説明、タグ、期限を指定できます。
ダッシュボード情報の確認
AIに「今日のタスク状況を教えて」と伝えると、kakiko_overview ツールで以下の情報を取得します。
- 今日の期限タスク数、期限切れタスク数
- 進行中のタスク数、今日完了したタスク数
- 今週の完了数と作成数
- アクティブなルーティン数
ルーティンの確認
AIに「ルーティンの一覧を見せて」と伝えると、routines_query ツールでルーティン情報を取得します。
リアルタイム同期
MCPサーバー経由でタスクを変更すると、kakikoアプリの画面に自動的に反映されます。kakikoアプリが変更を2秒間隔で検知し、タスクリストを自動更新します。
提供ツール一覧
| ツール名 | 操作 | 説明 |
|---|---|---|
tasks_query | 読み取り | タスクの検索・フィルタリング |
tasks_get | 読み取り | 単一タスクの詳細取得 |
tasks_mutate | 書き込み | タスクの作成・更新・削除・ステータス変更・スリープ操作 |
routines_query | 読み取り | ルーティン一覧の取得 |
kakiko_overview | 読み取り | ダッシュボード統計情報の取得 |
Manage kakiko Tasks from AI Clients (MCP Integration)
Learn how to set up the MCP server to manage kakiko tasks and routines from AI clients such as Claude Desktop and Claude Code.
This article explains how to set up the MCP server and manage kakiko tasks and routines from AI clients.
What Is an MCP Server?
An MCP (Model Context Protocol) server provides a mechanism for AI clients (Claude Desktop, Claude Code, Cursor, etc.) to directly access kakiko data.
Once the MCP server is configured, you can perform the following operations through conversations with AI:
- Search, create, update, and delete tasks
- List routines (habits)
- Retrieve dashboard information (today’s due tasks, overdue count, etc.)
Prerequisites
- Node.js 18.0.0 or later installed
- kakiko desktop app installed and launched at least once
Setup Instructions
Claude Desktop
- Open the Claude Desktop configuration file.
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
- Add the following content.
{
"mcpServers": {
"kakiko": {
"command": "npx",
"args": ["-y", "@frater/kakiko-mcp-server"]
}
}
}
- Restart Claude Desktop.
On Windows, run via cmd:
{
"mcpServers": {
"kakiko": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@frater/kakiko-mcp-server"]
}
}
}
Claude Code
- Add the following to your project’s
.mcp.json.
{
"mcpServers": {
"kakiko": {
"command": "npx",
"args": ["-y", "@frater/kakiko-mcp-server"]
}
}
}
Cursor
- Open Cursor Settings.
- Add the following to the “MCP Servers” section.
{
"kakiko": {
"command": "npx",
"args": ["-y", "@frater/kakiko-mcp-server"]
}
}
Specifying the Database Path
The MCP server automatically detects the path to kakiko’s SQLite database. No configuration is usually required.
The default paths detected automatically are:
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/io.kakiko/kakiko.db |
| Windows | %APPDATA%\io.kakiko\kakiko.db |
| Linux | ~/.local/share/io.kakiko/kakiko.db |
If you have changed the database location, specify it explicitly with the --db option.
{
"mcpServers": {
"kakiko": {
"command": "npx",
"args": ["-y", "@frater/kakiko-mcp-server", "--db", "/path/to/kakiko.db"]
}
}
}
Read-Only Mode
To disable task creation, updates, and deletion and allow only read operations, add the --readonly option.
{
"mcpServers": {
"kakiko": {
"command": "npx",
"args": ["-y", "@frater/kakiko-mcp-server", "--readonly"]
}
}
}
In read-only mode, the tasks_mutate tool is disabled.
Usage Examples from AI Clients
Searching Tasks
Ask the AI something like “Show me tasks due today” and it will search tasks using the tasks_query tool. You can filter by status, tags, due date, and text.
Creating Tasks
Ask the AI something like “Add a task to prepare the document by tomorrow” and it will create a task using the tasks_mutate tool. You can specify the title, description, tags, and due date.
Checking Dashboard Information
Ask the AI something like “Show me today’s task status” and it will retrieve the following information using the kakiko_overview tool:
- Number of tasks due today and overdue tasks
- Number of in-progress tasks and tasks completed today
- Number of tasks completed and created this week
- Number of active routines
Checking Routines
Ask the AI something like “Show me the list of routines” and it will retrieve routine information using the routines_query tool.
Real-Time Sync
When tasks are modified via the MCP server, the changes are automatically reflected in the kakiko app. The kakiko app detects changes at 2-second intervals and automatically refreshes the task list.
Available Tools
| Tool Name | Operation | Description |
|---|---|---|
tasks_query | Read | Search and filter tasks |
tasks_get | Read | Get details of a single task |
tasks_mutate | Write | Create, update, delete, change status, and sleep tasks |
routines_query | Read | List routines |
kakiko_overview | Read | Get dashboard statistics |