MCP Tools
Rekor offers two MCP interfaces for different stages of the agent lifecycle:
| Interface | For whom | What it does | Endpoint |
|---|---|---|---|
| Admin MCP | Agent builders | 11 generic tools for setup: create databases, define schemas, manage hooks/triggers, configure endpoints | mcp.rekor.pro/mcp |
| MCP Factory | Specialized agents | Custom, domain-specific tools generated from your collection schemas (e.g., create_invoice, list_payments) | mcp.rekor.pro/e/{slug}/mcp |
Use the Admin MCP to build your data model. Use MCP Factory endpoints to let production agents use it — with tools tailored to their specific domain.
Admin MCP
Eleven tools that give AI agents full CRUD over databases, collections, documents, relationships, files, and integrations. Each tool supports multiple actions via an action parameter — one tool per domain, not one tool per operation.
Connecting an Agent
Point any MCP-compatible client at Rekor's MCP server.
Claude Desktop / Claude Code
Add this to your MCP config:
{
"mcpServers": {
"rekor": {
"url": "https://mcp.rekor.pro/mcp",
"headers": {
"Authorization": "Bearer rec_your_token_here"
}
}
}
}
Any MCP Client
The MCP server endpoint is https://mcp.rekor.pro/mcp. SSE transport is available at /sse. Pass a Bearer token for authentication.
Discovery Pattern
Agents should always start with manage_database(list) to discover available databases, then manage_collection(list) to see what data types exist. This gives the agent full context before it starts reading or writing.
// Step 1: What databases exist?
manage_database({ action: "list" })
// Step 2: What collections does this database have?
manage_collection({ action: "list", database_id: "crm" })
// Step 3: Read or write documents
sql_query({ database_id: "crm", query: "SELECT * FROM documents WHERE database_id = {database_id:String} AND collection = 'contacts' AND deleted = false LIMIT 10" })
Common Workflows
CRUD a record
// Create or update
manage_document({ action: "upsert", database_id: "crm", collection: "contacts",
external_id: "c_001", external_source: "crm",
data: { name: "Jane Doe", email: "jane@acme.com" } })
// Read
manage_document({ action: "get", database_id: "crm", collection: "contacts", id: "..." })
// Delete
manage_document({ action: "delete", database_id: "crm", collection: "contacts", id: "..." })
Query with SQL
// Filter + sort
sql_query({ database_id: "crm",
query: "SELECT data.title.:String as deal, CAST(data.value, 'Float64') as value FROM documents WHERE database_id = {database_id:String} AND collection = 'deals' AND data.stage.:String = 'negotiation' AND deleted = false ORDER BY value DESC LIMIT 20" })
// Aggregate
sql_query({ database_id: "crm",
query: "SELECT data.stage.:String as stage, sum(CAST(data.value, 'Float64')) as pipeline FROM documents WHERE database_id = {database_id:String} AND collection = 'deals' AND deleted = false GROUP BY stage" })
Link documents with relationships
// Create a relationship
manage_relationship({ action: "upsert", database_id: "crm",
rel_type: "owns", source_collection: "contacts", source_id: "c_001",
target_collection: "deals", target_id: "d_001" })
// Traverse
query_relationships({ database_id: "crm", collection: "contacts",
document_id: "c_001", rel_type: "owns", direction: "outgoing" })
Available Tools
| Tool | Description |
|---|---|
batch_operations | Execute multiple document, relationship, and collection operations atomically. All operations succeed or all fail. Use for transactions, multi-entity writes, or any case where consistency between operations is required. Max 1,000 operations. |
manage_attachment | Manage file attachments on documents. Filenames can include paths for folder structure (e.g. 'docs/guide.md', 'src/index.ts'). Upload returns a presigned URL — the agent uploads bytes directly. |
manage_collection | Manage collection schemas. Actions: upsert, get, list, delete. Use list to discover what collections exist in a database. |
manage_database | Manage databases. Actions: create, get, list, delete, create_preview, list_previews. Start here to discover existing databases before operating. Note: schema changes (collections, triggers, hooks) can only be made in preview databases. Use create_preview to create a preview from a production database, then promote via CLI. |
manage_document | Create, read, update, delete, or cancel individual documents. Uses PUT for upsert. Supply external_id (and optional external_source) for idempotent writes from external systems — the internal UUID is auto-generated. Use document_id (internal UUID) for get/delete/cancel or to update a known document. Documents may be archived (_archived: true in response) — archived documents are read-only and cannot be upserted, but can be cancelled or deleted. |
manage_hook | Manage inbound webhook endpoints. Hooks accept Record-format JSON and upsert through the normal write path. |
manage_relationship | Create, read, update, or delete relationships between documents. Relationships are typed, directed links with optional metadata. |
manage_trigger | Manage outbound triggers. Triggers fire HTTP POST to a URL when documents or relationships change. |
provider_adapter | Convert between LLM provider tool formats (openai, anthropic, google, mcp) and Document collections. Actions: import_tools (create collections from tool definitions), export_tools (export collections as tool definitions), import_tool_call (create a document from a tool call in provider format). |
query_relationships | Query relationships for a specific document. Find related documents by type and direction. |
sql_query | Execute a read-only SQL query against database data. Tables: documents, relationships, collections, databases, operations_log. Always include database_id = {database_id:String} and deleted = false in WHERE. Queries return the latest version of each row automatically. |
MCP Factory
For production agents that need domain-specific tools instead of generic CRUD, see MCP Factory. Create custom MCP endpoints where agents see create_invoice and list_payments — not manage_document.