{"openapi":"3.1.0","info":{"title":"MemCalendar V2 API","version":"2.0.0","description":"Unified Calendar, memU v2 & 6-Month GraphRAG Memory, Task Workbench, Pre-Meeting Briefings, and Stateless Streamable HTTP MCP API."},"servers":[{"url":"https://www.memcalendar.com/api","description":"MemCalendar API Server"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"paths":{"/mcp":{"post":{"summary":"Stateless Streamable HTTP MCP endpoint","description":"Handles JSON-RPC 2.0 requests (initialize, tools/list, tools/call, resources/list, resources/read, prompts/list, prompts/get) statelessly per request.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}}},"responses":{"200":{"description":"JSON-RPC 2.0 response (or SSE stream when Accept: text/event-stream)"},"202":{"description":"Accepted notification"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"get":{"summary":"Backwards-compatible MCP SSE endpoint","description":"Opens an SSE stream and emits an HMAC-SHA256 signed stateless session endpoint URL.","responses":{"200":{"description":"SSE event stream"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/events":{"get":{"summary":"List calendar events","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"scope","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":100}}],"responses":{"200":{"description":"List of calendar events"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"summary":"Create calendar event","description":"Creates a calendar event, detects conflicts, syncs to connected external calendars, and stores linked memory.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventInput"}}}},"responses":{"201":{"description":"Event created"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/events/{id}":{"patch":{"summary":"Update calendar event","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEventInput"}}}},"responses":{"200":{"description":"Event updated"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"delete":{"summary":"Delete calendar event","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Event deleted"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/tasks":{"get":{"summary":"List tasks","parameters":[{"name":"smartView","in":"query","schema":{"type":"string","enum":["today","upcoming","overdue","all"]}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"priority","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of tasks"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"summary":"Create task","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaskInput"}}}},"responses":{"201":{"description":"Task created"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/tasks/{id}":{"patch":{"summary":"Update or complete task","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Task updated"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"delete":{"summary":"Delete task","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Task deleted"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/memories":{"get":{"summary":"List memories","responses":{"200":{"description":"List of memories"}}},"post":{"summary":"Create memory","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string"}}}}}},"responses":{"201":{"description":"Memory created"}}}},"/memories/search":{"post":{"summary":"Semantic vector search over memories","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string"},"limit":{"type":"integer","default":10}}}}}},"responses":{"200":{"description":"Matching memories"}}}},"/memories/graph":{"post":{"summary":"Hybrid 6-month GraphRAG + temporal + vector search","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string"},"lookbackDays":{"type":"integer","default":180}}}}}},"responses":{"200":{"description":"GraphRAG retrieval results"}}}},"/briefings":{"get":{"summary":"List persisted pre-meeting briefings","responses":{"200":{"description":"Briefings list"}}},"post":{"summary":"Generate a 1-minute pre-meeting briefing","responses":{"200":{"description":"Generated briefing"}}}},"/actions/proposals":{"get":{"summary":"List pending HITL action proposals","responses":{"200":{"description":"List of action proposals"}}},"post":{"summary":"Create or resolve an HITL action proposal","responses":{"200":{"description":"Proposal result"}}}},"/skill/bootstrap":{"post":{"summary":"Mint a personalized One-Link Skill bootstrap token","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expiresInHours":{"type":["number","null"],"default":24},"singleUse":{"type":"boolean","default":false}}}}}},"responses":{"201":{"description":"Bootstrap token created"}}},"get":{"summary":"Redeem a bootstrap token (with ?token=...) or list user tokens","parameters":[{"name":"token","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Pre-filled SKILL.md or JSON manifest"}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"MemCalendar API Key (mem_cal_...)"},"BearerAuth":{"type":"http","scheme":"bearer","description":"Supabase JWT or MemCalendar API Key"}},"schemas":{"JsonRpcRequest":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"]},"method":{"type":"string"},"params":{"type":"object"}}},"CreateEventInput":{"type":"object","required":["title","startTime","endTime"],"properties":{"title":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"location":{"type":"string"},"description":{"type":"string"},"allDay":{"type":"boolean"}}},"UpdateEventInput":{"type":"object","properties":{"title":{"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"location":{"type":"string"},"description":{"type":"string"},"allDay":{"type":"boolean"}}},"CreateTaskInput":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"dueDate":{"type":"string","format":"date-time"},"priority":{"type":"string","enum":["low","medium","high","urgent"]},"scheduledStart":{"type":"string","format":"date-time"},"scheduledEnd":{"type":"string","format":"date-time"}}}},"responses":{"Unauthorized":{"description":"Missing or invalid API key / session"}}}}