Skip to content

API Reference

ObsidianPalace exposes a REST API alongside the MCP transport. FastAPI automatically generates interactive API documentation from the Python type annotations and docstrings.

Live API Docs

When the server is running, interactive documentation is available at:

Format URL Description
Swagger UI /docs Interactive API explorer with try-it-out
ReDoc /redoc Clean, readable API reference
OpenAPI JSON /openapi.json Raw OpenAPI 3.1 specification

REST Endpoints

Method Path Description Auth
GET /health Health check (version + status) None
GET /docs Swagger UI None
GET /redoc ReDoc documentation None
GET /openapi.json OpenAPI specification None
GET /mcp/sse MCP SSE connection OAuth 2.0
POST /mcp/messages/ MCP message endpoint OAuth 2.0

Health Check

curl https://YOUR_URL/health
{
  "status": "ok",
  "version": "0.1.0"
}

Authentication

The MCP endpoints require a Google OAuth 2.0 Bearer token:

curl -H "Authorization: Bearer <token>" \
  https://YOUR_URL/mcp/sse

The token is validated against Google's userinfo endpoint. Only the configured allowed_email is permitted access.

Python Module Reference

Detailed auto-generated documentation for each Python module is available in the sidebar: