Upside Down Research, LLC · Est. MMXXIII A little different look at the world
Pre-release · subject to change
Documentation

MCP Integration

Tupshar exposes all document operations as MCP (Model Context Protocol) tools, letting Claude and other MCP-compatible clients read, write, search, and manage your documents directly.

Transport

ProtocolJSON-RPC 2.0 over HTTP
Endpointhttps://api.tupshar.housecarl.cloud/mcp/v1
AuthAuthorization: Bearer tupk_… (same API key as the REST API)

Three HTTP methods are used on the same path:

  • POST /mcp/v1 — send JSON-RPC requests
  • GET /mcp/v1 — SSE keepalive for the session
  • DELETE /mcp/v1 — tear down a session

JSON-RPC Methods

MethodPurpose
initializeEstablish a session and negotiate capabilities
tools/listList available tools
tools/callInvoke a tool

Available Tools

Tupshar provides 16 MCP tools.

File Operations

ToolRequired argsNotes
tupshar_file_createfilename, contentsOptional: tags, properties
tupshar_file_getidReturns document and metadata
tupshar_file_updateid, etag, filename, contentsetag is required — pass the current ETag from a prior file_get/file_create (optimistic concurrency)
tupshar_file_deleteidReturns {"deleted": true}
tupshar_file_existsid
tupshar_file_listPaginated
tupshar_file_statsidReturns token_count, unique_terms, and top terms
tupshar_file_scoreid, queryPer-term BM25 breakdown for query against the document
tupshar_file_retokenizeidRe-index a document
tupshar_file_set_propertiesid, propertiesOptional merge (default false = replace the property map; true = merge)
tupshar_file_add_linkid, target_idOptional: rel
tupshar_file_remove_linkid, target_id

Query Operations

ToolPurpose
tupshar_query_by_filenameSearch documents by filename pattern
tupshar_query_by_tokenFull-text BM25 search
tupshar_query_by_tagFind documents by tag
tupshar_query_by_propertyFind documents by property key/value

Arg names match the REST API: use filename and contents (not name/content); document identifiers use id (ULID).

Example: tools/call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "tupshar_query_by_token",
    "arguments": {
      "token": "planning review"
    }
  }
}

Another example — creating a document:

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "tupshar_file_create",
    "arguments": {
      "filename": "meeting-notes.md",
      "contents": "# Q3 Planning\n\nAction items...",
      "tags": ["planning", "q3"]
    }
  }
}

Configuring an MCP Client

Point your MCP client at the Tupshar endpoint with your API key as a Bearer token. The exact configuration syntax varies by client; the canonical values are:

  • Endpoint URL: https://api.tupshar.housecarl.cloud/mcp/v1
  • Transport: HTTP (JSON-RPC 2.0 over POST)
  • Auth header: Authorization: Bearer tupk_<your-key>

For Claude Desktop and similar clients, consult their documentation for how to register a custom MCP server with a URL and auth header. Once connected, all 16 Tupshar tools will appear in the tool list.

Troubleshooting

401 Unauthorized — The Authorization header is missing or the key is wrong. Verify you are sending Bearer tupk_… with the full key.

403 quota_exceeded — You have hit your document or storage quota. Delete unused documents or request a quota increase.

429 rate_limited — Over 60 requests/min. Respect the Retry-After header.

For the full error reference see @/docs/reference/errors.md. For the underlying REST API see @/docs/integration/http-api.md.