API & MCP Documentation
xNotePadAI exposes a 13-tool MCP (Model Context Protocol) server. AI agents like Claude, ChatGPT, and Cursor can use your notebook as a private memory layer.
Quick Start
Endpoint: POST https://www.xnotepadai.com/api/mcp/
Protocol: JSON-RPC 2.0
Auth: Authorization: Bearer <your-token>
Rate limit: 30 requests/minute per IP
Get a token: Settings → Connected Apps → Generate Token
Your Token
Your personal MCP token — copy into your agent config.
Enable AI in Settings first Show mcp.json config
Example Request
curl -X POST https://www.xnotepadai.com/api/mcp/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_notes",
"arguments": {}
}
}' Tools Reference (13 tools)
create_note
Create a new note with title and content.
Args: title (string), content (string)
list_notes
List all notes (titles, IDs, word counts).
Args: none
get_note
Get full content of a specific note by ID.
Args: note_id (string)
update_note
Update content of an existing note.
Args: note_id (string), content (string), title (optional)
delete_note
Delete a note (only agent-created notes can be deleted).
Args: note_id (string)
search_notes
Semantic search across all notes using vector embeddings (RAG).
Args: query (string)
ask_notes
Ask a question and get an AI-generated answer from your notes (Llama 3.3 70B).
Args: question (string)
get_versions
Get version history for a note.
Args: note_id (string)
tag_note
Add tags to a note.
Args: note_id (string), tags (array of strings)
link_notes
Add a [[wiki-link]] from one note to another.
Args: source_id (string), target_title (string)
merge_notes
Merge source note into target (source is deleted after merge).
Args: source_id (string), target_id (string)
archive_note
Archive a note (hidden from main view, retrievable later).
Args: note_id (string)
Authentication
All requests require a Bearer token in the Authorization header.
Tokens are generated in Settings → Connected Apps.
Each token is tied to a tenant (your notebook). Tokens cannot access other users' notes.
Revoke tokens anytime from Settings. Revoked tokens are rejected immediately.
Rate Limits
| Endpoint | Limit |
|---|---|
| /api/mcp/ | 30 req/min per IP |
| /api/device-sync/ | 20 req/min per IP |
| /api/attachments/ | 30 req/min per IP |
| /api/share/ | 30 req/min per IP |
| /api/share-unlock/ | 5 attempts/15min per note+IP |
| /api/share-interact/ | 20 comments/hour per note |
429 responses include a Retry-After: 60 header.
Use Cases
Claude Desktop: "Save this research to my xNotePadAI" → create_note
Coding agent: "What did I decide about the auth architecture?" → ask_notes
ChatGPT: "Add meeting decisions to Project Alpha" → update_note
Automation: Tag all notes from this week → list_notes + tag_note
Research: "Find everything about machine learning" → search_notes
Privacy & Security
• Notes marked 🔒 CONFIDENTIAL are never returned by any API call
• Each token is scoped to one tenant — no cross-tenant access possible
• Agent-created notes are tagged agent-created and sandboxed (agents can't modify human notes via delete)
• All connections over HTTPS with Cloudflare's edge TLS
• Token hashes stored with SHA-256 — plaintext tokens never persisted