Get started
Authentication
The MCP server signs in a person with OAuth 2.1: no key to copy. The REST API authenticates each request with an API key. Both reach the same views of the same account.
Who can connect
The MCP server and the REST API are the API and MCP module of an Obsidian account, opened on request (ask for it). Inside it, each family follows its own module: the news of your watches with Regulatory Monitoring, your regulatory database with Regulatory Database. A member of an organization reads the access of the organization.
MCP: OAuth 2.1
The server at https://mcp.obsidianri.com/mcp is an OAuth 2.1 protected resource. Your MCP client does the whole flow on its own: you only sign in and click Allow.
- The client calls the server without a token and gets
401with aWWW-Authenticateheader naming the resource metadata. - It reads the metadata, then registers itself (dynamic client registration) as a public client: no client secret.
- It opens the Obsidian sign-in in your browser with a PKCE challenge (
S256). You sign in with your Obsidian account and allow the access. - It exchanges the code for an access token and sends it as
Authorization: Beareron every MCP request.
The metadata
| Document | URL |
|---|---|
| Protected resource (RFC 9728) | https://mcp.obsidianri.com/.well-known/oauth-protected-resource |
| Authorization server (RFC 8414) | https://obsidianri.com/.well-known/oauth-authorization-server |
curl -i -X POST https://mcp.obsidianri.com/mcp
# HTTP/2 401
# www-authenticate: Bearer resource_metadata="https://mcp.obsidianri.com/.well-known/oauth-protected-resource"
curl https://mcp.obsidianri.com/.well-known/oauth-protected-resource
# {"resource": "https://mcp.obsidianri.com", "authorization_servers": ["https://obsidianri.com"], "bearer_methods_supported": ["header"]}The authorization server
| Setting | Value |
|---|---|
| Issuer | https://obsidianri.com |
| Authorization endpoint | https://obsidianri.com/oauth/authorize |
| Token endpoint | https://obsidianri.com/oauth/token |
| Registration endpoint (RFC 7591) | https://obsidianri.com/oauth/register |
| Response type | code |
| Grant types | authorization_code, refresh_token |
| PKCE | Required, S256 |
| Client authentication | none: public clients |
| Scope | mcp:read |
Tokens
- Authorization code: valid 10 minutes.
- Access token: valid 1 hour (
expires_in3600). The client sends it asAuthorization: Bearer <token>. - Refresh token: valid 60 days. The client uses it to get a new access token without asking you to sign in again.
Access is checked again at every token and refresh: when the API and MCP module of the account is switched off, no new token is issued, and every tool call is refused within a minute (see MCP errors). The MCP server does not accept an API key: it only takes an Obsidian OAuth token.
Clients that need a static OAuth client with a client secret (the admin connectors of Gemini Enterprise and Microsoft 365 Copilot) are not self-serve: contact us.
REST API: API keys
Every request to https://api.obsidianri.com carries an API key. A key belongs to one person and reads that person's own views, exactly as they see them in Obsidian and through their MCP connection.
Create a key
- Open app.obsidianri.com/account#api (Account → API).
- Create a key. It looks like
obsidian_sk_followed by 40 hexadecimal characters. - Copy it at once: it is shown only at creation. Obsidian keeps a fingerprint of it, never the key itself.
Send the key
Send it in the X-API-Key header. Authorization: Bearer is accepted too.
curl https://api.obsidianri.com/v1/database/overview \
-H "X-API-Key: $OBSIDIAN_API_KEY"
# also accepted
curl https://api.obsidianri.com/v1/database/overview \
-H "Authorization: Bearer $OBSIDIAN_API_KEY"Keep keys safe
- Keep keys on your servers: never in a browser page or a mobile app.
- Rotate: create a new key, move your integration to it, then revoke the old one at Account → API. A revoked key stops working at once.
- A key follows its account: a change to your database or your watches shows at once, with nothing to do on the key.
A missing key returns 401 with Missing API key. Provide via X-API-Key header or Authorization: Bearer <key>; an unknown or revoked key returns 401 with Invalid or expired API key. Every code is on Errors and limits.