SECTION 01
1. Overview & Purpose
Primed is an evidence-grounded endurance coaching intelligence platform for self-directed athletes (runners, cyclists, and triathletes).
The Primed MCP Connector provides an authenticated, read-only interface allowing AI assistants (such as Meta Muse, Claude, and OpenAI ChatGPT) to access an athlete's canonical coaching decisions, planned training schedules, athletic recovery states, and completed activities.
Key Architectural Invariants
- Canonical Coaching Authority: All coaching decisions, session adaptations, and recovery evaluations originate from Primed’s deterministic coaching engine (
DailyCoachingDecisionService). The AI assistant consumes and explains these decisions; it does not independently compute or invent workouts. - 100% Read-Only V1 Contract: The connector contains zero mutation or deletion tools. It does not alter training calendars, modify athlete accounts, or execute financial transactions.
- Zero Split-Brain: All connected surfaces (native apps, web client, and MCP connectors) consume identical canonical records. Dual-writes, out-of-band mutations, and unversioned fallbacks are strictly prohibited.
- Non-PHI & Data Minimization: Exposes only high-level athletic training parameters and classifications. Collects no Protected Health Information (PHI), clinical diagnostic data, or raw continuous biometric streams (such as raw ECG or HRV tachograms).
Intended Coaching Lifecycle
evidence → judgement → canonical decision/DCD → authorised mutation → verified persistence → athlete-facing presentation → independent verification
SECTION 02
2. Authentication & Authorization
The Primed MCP server requires OAuth 2.1 authentication on all tool endpoints.
- OAuth 2.1 Authorization Server:
https://auth.beprimed.ai/ - OAuth Protected Resource Metadata:
https://mcp.beprimed.ai/.well-known/oauth-protected-resource - Token Format: Bearer JSON Web Token (JWT) signed with RS256, validated against Primed JWKS.
- Tenant Isolation: Every request binds strictly to the
sub (athlete user ID) claim verified in the JWT. Cross-athlete or unauthorized data queries are rejected at the protocol layer.
Supported OAuth Scopes
All supported scopes are strictly limited to read operations:
| Scope | Description | Sensitivity |
|---|
primed:profile:read | Read connected athlete display name, primary sport, and timezone | Low |
primed:coaching:read | Read today's canonical Daily Coaching Decision (DCD) and adaptation reasoning | Medium |
primed:training:read | Read upcoming scheduled workouts and training plan calendar | Low |
primed:activities:read | Read recent completed training session volume and activity summaries | Low |
SECTION 04
4. Error Handling & Status Codes
All errors conform to RFC 7807 problem details and standardized MCP error payloads with machine-readable canonical codes:
{
"jsonrpc": "2.0",
"error": {
"code": -32001,
"message": "Authentication required to access today coaching decision",
"data": {
"code": "UNAUTHENTICATED",
"message": "Authentication required to access today coaching decision"
}
},
"id": 1
}
Canonical Error Codes
| Error Code | HTTP Status | Meaning | Recovery Action |
|---|
UNAUTHENTICATED | 401 | Missing or invalid OAuth Bearer token | Re-authenticate via OAuth flow |
INSUFFICIENT_SCOPE | 403 | Token lacks required scope for tool | Request consent for the required scope |
FORBIDDEN | 403 | Athlete account suspended or restricted | Contact Primed support |
INVALID_ARGUMENT | 400 | Argument validation failure (e.g. malformed date) | Check input formats and retry |
NO_DATA | 200 / 404 | No coaching decision or workouts recorded for period | Rest day or onboarding pending |
STALE_DATA | 200 | Wearable sync delayed; cached decision returned | Advise user to sync wearable |
RATE_LIMITED | 429 | Rate limit exceeded | Back off and retry after cooldown |
DEPENDENCY_UNAVAILABLE | 503 | Upstream service temporarily unavailable | Retry after brief delay |
UNSUPPORTED_OPERATION | 400 | Client requested write/mutation in read-only V1 | Advise user that V1 is read-only |
SECTION 05
5. Rate Limits & Quotas
To ensure service reliability and prevent accidental client looping:
- Standard Quota: 60 requests per minute per authenticated athlete token.
- Burst Allowance: Up to 10 concurrent requests.
- Exceeded Limits: Returns HTTP
429 Too Many Requests with a standard Retry-After header and canonical code RATE_LIMITED.
Recommended Client Retry Strategy
Clients should parse the Retry-After HTTP header and apply exponential backoff with jitter (minimum 1.5x backoff factor) when receiving a 429 response.
SECTION 06
6. Privacy, Security & Compliance
Data Protection Safeguards
- Encryption in Transit: All traffic is strictly enforced over TLS 1.3.
- Encryption at Rest: All persisted data is encrypted with AES-256.
- Zero Model Training on Athlete Data: Data processed through the Primed MCP connector is never used to train foundational AI models, sold to third parties, or used for advertising.
- Data Minimization: Only requested fields are transmitted.
- Token Revocation: When an athlete disconnects the connector in Muse or Primed, OAuth tokens are revoked immediately, preventing any subsequent access.
Health Boundaries (Non-PHI)
Primed is an athletic training intelligence platform, not a medical provider. The MCP tools:
- Do NOT diagnose medical symptoms or clinical conditions (e.g. chest pain, cardiac anomalies).
- Do NOT process or expose Protected Health Information (PHI) under HIPAA or health records under GDPR.
- Direct athletes to seek immediate professional medical attention in the event of injury or health distress.
Security Incident Reporting (Meta Policy § 4.8)
In compliance with Meta Muse Connector Platform requirements, any confirmed security incident involving user data will be escalated to Meta at vendor-incident@meta.com within 48 hours.
SECTION 07
7. Client Configuration & Quickstarts
Connect your favorite MCP-compatible agent or client directly to the Primed MCP Server.
Claude Desktop Configuration
Add the following to your claude_desktop_config.json file (located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"primed": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"--url",
"https://mcp.beprimed.ai/mcp"
],
"env": {
"PRIMED_BEARER_TOKEN": "YOUR_OAUTH_BEARER_TOKEN"
}
}
}
}
Direct HTTP / SSE Query with Curl
Test tool invocation directly using standard JSON-RPC over Streamable HTTP:
curl -X POST https://mcp.beprimed.ai/mcp \
-H "Authorization: Bearer $PRIMED_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_today_coaching",
"arguments": {}
}
}'