Health Coach MCP
A personal health and fitness MCP server that provides tools for managing profile data, goals, body measurements, nutrition, workouts, sleep, check-ins, life events, analytics, and coach memories via Supabase Postgres.
README
Health Coach MCP
A personal health and fitness MCP server backed by Supabase Postgres. It exposes tools for profile data, goals, body measurements, nutrition, workouts, sleep, check-ins, contextual life events, analytics, and coach memories over MCP Streamable HTTP.
The server is built for private, user-scoped use: every tool call resolves the authenticated user from the request token, not from tool input.
Architecture
flowchart LR
claude["Claude / MCP client"] -->|Streamable HTTP| hono["Hono app"]
subgraph app["Health Coach MCP server"]
hono --> auth["Auth middleware"]
hono --> mcp["MCP transport"]
hono --> oauth["OAuth consent UI"]
mcp --> tools["MCP tools"]
tools --> services["Domain services"]
services --> repos["Repositories"]
end
auth -->|JWKS validation| supabaseAuth["Supabase Auth"]
oauth -->|OAuth 2.1 / PKCE| supabaseAuth
repos -->|Drizzle ORM| postgres["Supabase Postgres"]
services --> domains["Profiles, goals, measurements, nutrition, workouts, sleep, check-ins, events, analytics, memories"]
Stack
- Node.js 24
- TypeScript
- Hono
- MCP TypeScript SDK
- Drizzle ORM
- Supabase Postgres
- Vitest
Configuration
Copy the sample environment and fill in the values for your Supabase project:
cp .env.example .env
Required for production:
DATABASE_URL: Supabase pooled Postgres URL. Use the transaction-mode pooler on Railway.PUBLIC_BASE_URL: public HTTPS origin for the deployed server, for examplehttps://health-coach-mcp-production.up.railway.app.SUPABASE_URL: your Supabase project URL.SUPABASE_PUBLISHABLE_KEY: public browser key used by the OAuth consent page.
Optional:
SUPABASE_OAUTH_ISSUER: explicit Supabase OAuth issuer. Defaults to${SUPABASE_URL}/auth/v1.SUPABASE_JWKS_URL: explicit JWKS URL. Defaults to${SUPABASE_URL}/auth/v1/.well-known/jwks.json.PERSONAL_CONNECTOR_TOKENandPERSONAL_CONNECTOR_USER_ID: private single-user connector URL fallback for clients that cannot send bearer headers or complete OAuth.DEV_AUTH_TOKENandDEV_AUTH_USER_ID: local development only.
Do not commit .env.
Commands
pnpm install
pnpm format
pnpm lint
pnpm typecheck
pnpm test
pnpm test:integration
pnpm test:e2e
pnpm build
Local Development
pnpm install
pnpm dev
The service exposes:
GET /healthGET /readyPOST /mcp
/mcp expects Authorization: Bearer <Supabase access token>. For local development only, DEV_AUTH_TOKEN can be used instead.
Database
Migrations live in supabase/migrations.
For local Supabase:
pnpm db:start
pnpm db:reset
For hosted Supabase, apply migrations with the Supabase CLI:
supabase db push --db-url "$DATABASE_URL"
Claude Connector
For the real multi-user flow, enable Supabase Auth's OAuth 2.1 Server and Dynamic Client Registration in the Supabase dashboard. Then add the deployed MCP endpoint in Claude:
Use the deployed MCP endpoint:
https://YOUR_PUBLIC_HOSTNAME/mcp
Leave OAuth client ID and secret blank when Dynamic Client Registration is enabled.
For private development only, if Claude cannot complete OAuth for your custom connector, use the connector-token fallback:
https://YOUR_PUBLIC_HOSTNAME/mcp?connector_token=YOUR_RANDOM_CONNECTOR_TOKEN
Treat that URL as a secret. It maps every request to the configured PERSONAL_CONNECTOR_USER_ID.
Deployment
Railway is the recommended first deployment target. Set production variables in Railway, deploy the Node service, then confirm:
curl https://YOUR_PUBLIC_HOSTNAME/health
curl https://YOUR_PUBLIC_HOSTNAME/ready
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。