What is MCP?
The Model Context Protocol (MCP) is a JSON-RPC 2.0 interface that enables AI agents and applications to discover and interact with Mirobody Health’s tools and resources. It provides a standardized way for LLMs to access health data, call functions, and retrieve contextual information.MCP Endpoint:
http://localhost:18080/mcp (public) or http://localhost:18080/mcp/{user_secret} (user-specific)Protocol Version: 2025-06-18Key Concepts
Tools
Callable functions that perform actions (e.g., fetch health data, render charts, link providers)
Resources
Read-only data sources that provide context (e.g., user profiles, chart templates, upload forms)
JSON-RPC 2.0
Standard protocol for remote procedure calls with request/response format
Authentication
JWT-based authentication with optional OAuth flow for tool authorization
MCP Methods
The MCP service supports the following standard methods:| Method | Description |
|---|---|
initialize | Handshake to establish protocol version and capabilities |
tools/list | List all available tools |
tools/call | Execute a specific tool |
resources/list | List all available resources |
resources/read | Read a specific resource |
prompts/list | List available prompt templates |
prompts/get | Get a specific prompt template |
Authentication
MCP endpoints support two authentication modes:- JWT Token (Recommended)
- User Secret URL
Pass JWT token in the Authorization header:
Example: Initialize
Example: List Tools
Example: Call Tool
Error Handling
MCP uses standard JSON-RPC 2.0 error codes:| Code | Name | Description |
|---|---|---|
-32700 | Parse error | Invalid JSON |
-32600 | Invalid Request | Missing required fields |
-32601 | Method not found | Unknown method |
-32602 | Invalid params | Invalid method parameters |
-32603 | Internal error | Server-side error |
-32000 | Auth required | Authentication needed |
Tool Categories
Mirobody Health MCP tools are organized into categories:Health Data Tools
Query health indicators, genetic data, and user profiles
Chart Tools
Render visualizations of health data
Provider Tools
Link and manage health device providers
File Tools
Upload and process health documents