What is A server implementation of the Model Context Protocol (MCP) for exposing data in HarperDB.?
Harper MCP Server is designed to expose data in HarperDB as structured 'Resources' accessible via standardized JSON-RPC calls. It provides read-only access to data from Harper tables and custom resources, supports filtering and pagination, and implements role-based security for data access.
Documentation
Harper MCP Server
A server implementation of the Model Context Protocol (MCP), designed to expose data in HarperDB as structured "Resources" accessible via standardized JSON-RPC calls.
Note: Requires HarperDB version 4.5.10 or later.
What is Harper
Harper is a Composable Application Platform that merges database, cache, app logic, and messaging into a single runtime. Components like this plug directly into Harper, letting you build and scale distributed services fast, without managing separate systems. Built for geo-distributed apps with low latency and high uptime by default.
Harper employs role-based, attribute-level security to ensure users access only authorized data. Requests to the server are authenticated using HarperDB's built-in authentication mechanisms, which include Basic Auth, JWT, and mTLS.
See Harper Security Docs for more details.
API# MCP Methods
The server implements the following MCP methods:
resources/list: Lists all available resources (HarperDB tables and custom resources).
resources/read: Retrieves data for a specific resource based on its URI.
A single endpoint, /mcp handles all requests. The server uses JSON-RPC 2.0 for communication.
Request Format: All requests are sent as JSON-RPC 2.0 formatted JSON objects.
Response Format: The server responds with JSON-RPC 2.0 formatted JSON objects.
Error Handling: The server returns standardized error responses.
Resource URIs
Tables: Resources representing HarperDB tables are accessed via URIs like:
{HOST}/{table_name}
Example: http://localhost:9925/my_table
Table Rows: Individual rows within a table can be accessed using the primary key:
{HOST}/{table_name}/{primary_key_value}
Example: http://localhost:9925/my_table/123 (where 123 is the primary key value)
Custom Resources: Custom resources are accessed via URIs defined by their registered path: