Skip to main content

ShrineAgent MCP Developer Guide

Connect your AI client to Syntropy Health via the Model Context Protocol (MCP). Live capabilities page: /shrine-agent

Overview

ShrineAgent exposes 10 MCP tools for health data, diet analysis, AI chat, and check-in management. Any MCP-compatible client (Claude Desktop, VS Code, custom agents) can connect.

Authentication

All tools require a Clerk JWT bearer token.
  1. Sign in at syntropyhealth.com
  2. Go to Settings > Account > API Tokens
  3. Generate a token
  4. Use as Authorization: Bearer <token> header

Connection

PropertyValue
TransportStreamable HTTP
Endpointhttps://api.syntropyhealth.com/mcp
AuthBearer token (Clerk JWT)
Rate Limit (read)60 requests/min
Rate Limit (write)20 requests/min

Quick Start

Claude Desktop

Add to claude_desktop_config.json:
{
  "mcpServers": {
    "shrine-health": {
      "url": "https://api.syntropyhealth.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_CLERK_JWT"
      }
    }
  }
}

VS Code (Claude Extension)

Add to VS Code settings.json:
{
  "claude.mcpServers": {
    "shrine-health": {
      "url": "https://api.syntropyhealth.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_CLERK_JWT"
      }
    }
  }
}

cURL (test connection)

curl -X POST https://api.syntropyhealth.com/mcp \
  -H "Authorization: Bearer YOUR_CLERK_JWT" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'

Tool Catalog

Chat / AI

ToolTypeDescription
chat_with_shrinewriteChat with ShrineAI, your personal health AI assistant

Diet & Scoring

ToolTypeDescription
get_diet_scorereadGet diet fulfillment score over the last N days
get_diet_gapreadCompare actual macro intake vs ideal targets
analyze_foodwriteAnalyze a food item for nutritional content
log_foodwriteLog a food entry to your health journal

Health Data

ToolTypeDescription
get_health_snapshotreadAggregated health snapshot including food logs and symptoms
get_health_profilereadHealth profile with dietary preferences, goals, conditions
get_my_protocolsreadWellness protocols you’re subscribed to

Check-ins

ToolTypeDescription
log_checkinwriteRecord a daily health check-in
get_my_checkinsreadGet your recent health check-ins

Rate Limits

  • Read operations (get_*): 60 requests per minute per user
  • Write operations (log_, chat_, analyze_*): 20 requests per minute per user
  • Rate limit buckets reset per-user on a rolling window
  • Exceeding limits returns an error response (not an HTTP error)

Error Handling

All tools return a JSON dict. On error:
{
  "error": "Description of what went wrong"
}
Common errors:
  • "Authentication required" — missing or invalid JWT
  • "Rate limit exceeded" — too many requests, wait and retry
  • "Chat temporarily unavailable" — backend service issue

API Discovery

The capabilities endpoint is public (no auth required):
curl https://api.syntropyhealth.com/api/mcp/capabilities
Returns server metadata, tool catalog with parameter schemas, and rate limit info.

Health Check

Monitor service status:
curl https://api.syntropyhealth.com/api/health
Returns {"status": "healthy"} or {"status": "degraded", "services": {...}}.