MCP servers for agents
ekoDB and AI Hive expose separate hosted MCP servers. AI Hive is an optional managed AI server. ekoDB executes database tools under the calling key's grants; AI Hive exposes curated data and goal tools under the signed-in user's permissions and collection scope. A connection to one does not grant access to the other.
| Contract | ekoDB | AI Hive |
|---|---|---|
| Endpoint | POST /api/mcp on the database base URL | POST /mcp on the AI Hive base URL |
| Authentication | Authorization: Bearer <JWT> from a registered, scoped key with a recorded kind | Authorization: Bearer <MCP-token> from AI Hive's MCP sign-in |
| Availability | Enabled by default; disabling mcp_enabled returns 403 | Off by default; an administrator enables hosted_mcp_enabled. Disabled returns 404 |
| Human approval API | /api/approvals and its subroutes | /approvals and its subroutes |
| Discovery | Database caller-filtered catalogue | AI Hive curated, caller-filtered catalogue |
Never give an agent a person's approval credential or a bootstrap admin key. AI Hive refuses a Full-session token on /mcp; an MCP token cannot answer AI Hive approvals. ekoDB refuses MCP access for keys without a recorded kind. Exchange a registered database API key for a JWT before calling ekoDB MCP; the raw key is not a bearer JWT.
Connect your coding agent covers registration and credential storage. Approvals defines the separate human identity and held-call lifecycle.
Transport and discovery
Both endpoints accept JSON-RPC over stateless HTTP POST and support MCP protocol revisions 2025-11-25 and 2026-07-28. ekoDB defaults to 2025-11-25 when MCP-Protocol-Version is omitted. Do not add a session ID or use GET/DELETE to open or close an MCP session.
Both refuse any Origin header. Use an MCP client; a browser fetch carrying Origin is not an approval surface. When enabled, a non-POST request receives 405 with Allow: POST. AI Hive checks its disabled setting first and returns 404 in that case.
Start with initialize, then send the initialized notification. Use tools/list and its current inputSchema before calling a tool. For AI Hive, follow nextCursor until absent and reject repeated cursors. ekoDB returns its caller-filtered list in one response. Lists differ by grants, collection scope and enabled services; absence is not permission to call a tool anyway.
For tools/call, send the advertised name and an arguments object conforming to its schema. Umbrella tools use only the advertised op values. Do not invent per-operation names such as kv_get: ekoDB advertises kv with a narrowed op enum. Annotation hints such as readOnlyHint describe risk, not access grants.
A tool refusal is a result with isError: true; inspect the content even after HTTP success. Authentication, disabled-endpoint, malformed-request and protocol errors are separate failures. Honor AI Hive's Retry-After header on 429.
Confirmations
Approval cannot widen a key's access grants. For non-admin ekoDB keys, classified reads default to Allow and writes to Confirm; destructive calls require confirmation each time. Explicit tiers can require confirmation for reads or allow eligible writes. Unclassified tools always require confirmation each time. Classified administrator calls default to Allow, so use a narrowly scoped agent key.
Keep an authorized person's approval stream open before a Confirm-tier call. Without a reachable person, the server refuses immediately. Wait for the held call's result; progress is not approval, and submitting a duplicate write is not a way to resume it. In ekoDB, accepting text/event-stream enables held-call progress; _meta.progressToken requests MCP progress notifications, otherwise comments can keep the stream alive. Disconnecting cancels the pending call.
AI Hive has its own permissions and once-only rules. Structural calls, batch_transaction, goal deletion and goal completion are asked about each time. update_schema_plan writes nothing but is also asked about each time. A shared tool name does not imply identical approval policy on both servers.
AI Hive tool surface
AI Hive exposes collection queries, record reads/writes, text/vector/hybrid search, schema/index operations, batch operations and collection inspection. Its local goal tools are create_goal, list_goals, get_goal, complete_goal, update_goal and delete_goal, distinct from ekoDB's goal umbrella tool.
AI Hive's MCP catalogue excludes shell, filesystem, messaging and deployment operations, plus the database's function, schedule, webhook and KV management families. For a database tool AI Hive does not expose, use ekoDB MCP when your database key grants it. Never switch surfaces to bypass a refusal.
ekoDB tool reference
The explicit fragments below match the names emitted in ekoDB tool descriptions, including conditional entries. A caller sees only its permitted subset. web_research also requires server Perplexity configuration. Discover required fields and enum values from tools/list.
query_collection
Query collection records with filters, sorting, pagination and projection. See query expressions.
get_record
Read one record by ID and collection.
text_search
Search collection text with keyword and fuzzy matching.
vector_search
Search using vector embeddings for semantic similarity.
list_collections
Discover user collections visible to the calling key.
get_schema
Read a collection's field definitions and types.
collection_info
Inspect a collection's schema, counts, indexes and storage statistics.
query_explain
Inspect a query plan without executing the query.
list_functions
Discover stored functions visible to the calling key.
call_function
Call an existing stored function by label under its call grant and execution permissions. See functions.
get_function
Read a stored function definition and its parameters and pipeline.
insert_record
Insert a record into a permitted collection.
upsert_record
Insert or update a record using the advertised lookup and data fields.
update_record
Update fields on an existing record by ID.
update_record_action
Apply an atomic field action to one record.
delete_record
Delete a record by ID. Do not assume deleted data can be restored.
create_collection
Create a collection with a schema.
update_schema_plan
Preview a proposed schema change and its impact.
update_schema
Apply a schema change after reviewing its plan and required confirmation.
function_version
Inspect or restore a prior stored-function version using the advertised operation.
app_template
Inspect or install a supplied backend template using the advertised operation.
web_search
Search the web through an external service.
http_fetch
Fetch a web page by URL through an outbound request.
web_research
Research a question through Perplexity when configured.
chat_memory
Access memory scoped to the current chat.
customer_memory
Access memory scoped to the agent and customer pair.
agent_lesson_dismiss
Mark an agent lesson as resolved.
agent_lesson_list
Read an agent's recorded lessons.
agent_strength_list
Read an agent's recorded strengths.
count_records
Count matching collection records without requesting record payloads.
batch_insert
Insert a batch of records.
batch_update
Update a batch of records by ID.
batch_delete
Delete a batch of records by ID.
delete_collection
Delete a collection and its data. This is destructive.
batch_transaction
Execute supported write operations as a transaction.
create_index
Create a query index on a collection field.
delete_index
Delete a query index.
upsert_many
Insert or update a batch using the advertised lookup fields.
create_function
Save a new stored-function pipeline.
update_function
Change an existing stored-function definition.
delete_function
Delete a stored-function definition.
validate_function
Validate a proposed function definition without saving it.
hybrid_search
Combine keyword and vector search.
current_datetime
Obtain the current date and time from the server.
system_status
Inspect database runtime health and resource statistics.
server_logs
Read recent server log entries when permitted.
distinct_values
Read distinct values of a collection field.
kv
Read or manage KV entries through advertised op values. See KV store.
goal
Read or manage database-backed goals through advertised op values.
schedule
Read or manage stored-function schedules.
webhook
Read or manage outbound webhooks.
webhook_receiver
Read or manage inbound webhook receivers.
eval
Read or manage evaluation datasets and runs.
export_customer_session
Export a customer conversation when permitted.
list_audit_log
Read audit events visible to the calling key.
trigger
Read or manage collection-change triggers.
agent
Read or manage chat-agent configurations through advertised op values.
call_agent
Invoke another agent for a turn, subject to the caller's grants.
get_agent_usage
Read an agent's usage buckets.
list_customer_sessions
Discover customer sessions for an agent.
get_customer_session_messages
Read messages for an agent and customer conversation.
list_gemini_caches
Inspect Gemini context caches known to the database runtime.
get_deployment_stats
Read a deployment-wide summary of agents and usage.
get_agent_trace
Read an agent's per-turn execution traces.