health-mcp
Click on "Deploy 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., "@health-mcp Show my current health status and weekly trend for music and sleep."
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.
health-mcp
health.ojimpo.com(Cultural Health Dashboard)の健康・文化活動データを Claude から会話で扱えるようにする読み取り専用 MCP サーバーです。
背景・動機
health-ojimpo は、音楽・読書・運動・SNS などの日常の文化的活動を外部サービスから自動収集し、個人の基準値に対するスコアとして可視化することで、メンタルヘルスの変調を早期に察知するダッシュボードです。
ダッシュボードは「眺める」には良いのですが、「先月と比べて音楽が減ってるのはなぜ?」「この1年で読書が多かった月は?」のような問いかけにはAIとの対話のほうが向いています。そこでダッシュボードのデータをMCPツールとして公開し、claude.ai / Claude Code のどちらからでも自然言語で健康データを分析できるようにしました。
同じ構成の自作MCPサーバー otp-mcp(乗換案内)・cosense-mcp(Cosense)に続く3つ目で、足場(stdio/HTTP両対応のトランスポート層)はそれらから流用しています。
Related MCP server: Apple Health Shortcuts MCP
設計思想
読み取り専用: データの取り込みや設定変更は載せない。MCP経由での誤操作リスクをゼロにし、認証なし運用(後述)を許容できるようにする
バックエンドに寄生しない: health-ojimpo の REST API を叩くだけの薄いクライアント。スコアリングロジックはバックエンド側の単一実装のまま
出力サイズを制御: スコア履歴のカテゴリ列はオプトイン、生データは件数上限 + 週/月集計モードで、LLMのコンテキストを溢れさせない
stdio と Streamable HTTP の両対応: ローカルの Claude Code からは stdio、claude.ai からは Cloudflare Tunnel 経由の HTTP で同じサーバーに接続する
ツール
ツール | 説明 |
| 現在の健康/文化スコア・ステータス、カテゴリ別の今週vs先週、コンディション(睡眠/Readiness/ストレス等)、トレンドコメント |
| スコアの時系列(1m/3m=日次、1y=週次)。カテゴリ列は必要な分だけ指定 |
| 直近の具体的なアクティビティ(聴いた曲、運動、観た映画など) |
| 設定済みデータソース一覧(カテゴリ・分類・基準値)。query_records の引数探索用 |
| 生の日次レコードを日付範囲で取得。source/categoryフィルタ、week/month集計対応 |
構成
claude.ai ──HTTPS──> Cloudflare Tunnel ──> localhost:4102 ──> health-mcp(Docker)
Claude Code ──stdio──> node build/index.js │ HTTP (docker network)
health-ojimpo backend (FastAPI) <──┘health-mcp コンテナは health-ojimpo の Docker ネットワーク(
health-ojimpo_default)に相乗りし、http://backend:8000でAPIに到達しますstdio モード(Claude Code)はホストの
http://localhost:8400(backendのlocalhost公開ポート)を使います
セットアップ
ビルド
npm install
npm run buildCLI(動作確認用)
export HEALTH_API_BASE_URL=http://localhost:8400
node build/index.js status
node build/index.js history 3m music,sleep
node build/index.js recent 5
node build/index.js sources
node build/index.js records 2026-06-01 2026-06-30 lastfm '' weekDocker(HTTP モード)
docker compose up -d --build
curl http://localhost:4102/health # {"status":"ok"}※ health-ojimpo のスタックが先に起動している必要があります(externalネットワーク参照のため)。
Claude Code への登録(stdio)
claude mcp add --scope user health \
--env HEALTH_API_BASE_URL=http://localhost:8400 \
-- node /path/to/health-mcp/build/index.jsclaude.ai への登録(リモートコネクタ)
Cloudflare Tunnel の ingress に
health-mcp.example.com → http://localhost:4102を追加claude.ai → Settings → Connectors → Add custom connector → URL に
https://health-mcp.example.com/mcpを指定
環境変数
変数 | 既定値 | 説明 |
|
| health-ojimpo バックエンドのベースURL(Docker内は |
|
|
|
|
| HTTPモードのリッスンポート |
| (空) | 設定すると |
将来の展望
主観フィードバック(気分の記録)ツール — バックエンド側にエンドポイントができたら書き込み系として追加検討
スコア変動の要因分解ツール(どのソースがスコアを下げているかの内訳)
Available Tools
5 toolsget_current_statusA
Get the current snapshot of the personal health dashboard (health.ojimpo.com): overall health score/status (NORMAL/CAUTION/CRITICAL) and cultural activity score/status (RICH/MODERATE/LOW), per-category cards (this week vs previous week with change), condition state cards (sleep/readiness/stress/weight/outing/CTL), and trend comments. Scores are percentages of personal baselines (100 = baseline met). Use this first for any 'how am I doing' question.
Inputs: no named parameters.
get_recent_activitiesA
List the most recent concrete activities across all sources (e.g. tracks listened, workouts, movies watched, commits) as human-readable lines with relative time. The backend keeps the latest 8.
Inputs: limit.
get_score_historyA
Get the score time series: one row per date with overall health_score and cultural_score, plus optional per-category score columns. range 1m/3m = daily points, 1y = weekly points. Valid category names — activity: music, exercise, reading, movie, sns, coding, calendar, live, shopping, vitality, outing_activity, cd, podcast, game, like, study; state: sleep, readiness, stress, weight, outing, ctl. Add only the categories you need to keep output small.
Inputs: range, categories.
list_sourcesA
List all configured data sources with their category, display_type (activity/card_only/state), classification (baseline/event/health_only/both), status, and baseline (base_value per aggregation period). Use to discover valid 'source' and 'category' values for query_records.
Inputs: no named parameters.
query_recordsA
Query raw daily activity records (one row per date x source x category: minutes, raw_value, raw_unit). Requires a from/to date range (YYYY-MM-DD). Filter by source and/or category (see list_sources). For ranges over ~2 months prefer group_by week or month to keep output small; raw mode is capped by 'limit' and reports truncation.
Inputs: to (required), from (required), limit, source, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: snapshot status, recent activities, historical scores, source metadata, and raw data queries. No overlap in functionality.
All tool names follow a consistent verb_noun pattern (e.g., get_current_status, list_sources, query_records), making the set predictable and easy to navigate.
Five tools is an appropriate scope for a health dashboard, covering key operations without being too sparse or overly heavy.
The set provides a complete view of health data: current status, recent activities, historical trends, source configurations, and raw data access. No obvious gaps for a read-only dashboard.
Maintenance
Related MCP Connectors
Hosted MCP server exposing US hospital procedure cost data to AI assistants
Read-only MCP server exposing a user ORANO library to their own AI agent.
Hosted Apple Health MCP: workouts, sleep and HRV in ChatGPT, Claude, Gemini, Grok. Free, no export.
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
Related MCP Servers
- AlicenseAqualityBmaintenanceHosted MCP server that syncs health data from Apple Health, Fitbit, Oura, and Google Health Connect, enabling Claude and ChatGPT to query workouts, sleep, nutrition, and recovery in plain English with interactive charts.733MIT
- AlicenseNot gradedqualityNot gradedmaintenanceAn MCP server that gives AI read-only access to Apple Health data through shortcuts and Cloudflare, enabling queries of current stats, detailed records, and trends.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that exposes personal device data from sources like Oura into a unified SQLite store, allowing Claude to answer questions across metrics (sleep, activity, etc.) with a set of read-only tools.MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that exposes health metrics from the Sapphire Wellness App to AI assistants, enabling natural language queries for activity, blood pressure, glucose, heart rate, sleep, and SpO2 data.-