Context retriever: MCP tools over your data
Describe the records in a KiviDB database once and give AI agents search and lookup tools over them through MCP, with keys that carry server-side filters such as a tenant.
Describe the records already in a database (customers, orders, tickets and how they relate) as a context model. KiviDB builds the search indexes and gives agents tools to search and read them over MCP, through keys you can limit to some records and to filters the agent cannot get past.
Describe it once, the tools follow
- Entities Each kind of record: the keys under a prefix, stored as hashes or JSON, the fields an agent may search and read, and how records relate.
- Tools search, get and related records for every entity, such as search_customer and customer_orders, with the descriptions an agent needs to choose between them.
- Only your fields Records come back with the id and the fields in the model. Anything else in the key, an internal note or a hash, is never returned.
Filters the agent cannot remove
- Fixed filters A key can carry filters such as tenant = acme. Every query through it adds them on the server, so a record outside them is not found, whatever the agent asks for.
- Limited to some entities A key can be limited to some of the model's entities; the others' tools are not even listed.
- Shown once, revoked any time Keys are stored only as a hash and limited to 600 calls a minute each. Revoke one and the agent is refused at once.
With the rest of KiviDB
- Over live tables Point a model at the keys a data integration pipeline keeps from PostgreSQL or MySQL, and agents read your tables at memory speed.
- MCP or HTTP Any MCP client connects with one block of configuration; agents without MCP list and call the same tools over plain HTTP.
- No extra charge The indexes use the database's own memory, and calling the tools costs nothing beyond the database.
Questions
Can I try a tool before giving it to an agent?
Yes. The console runs any tool and shows the result exactly as an agent gets it, either seeing everything or as one of the model's keys would.
Does it change my data?
No. The tools only read, and deleting a model drops its indexes but never touches the records.
Does it work on sharded databases?
Not yet. Context models run on databases without shards.
Give your agent the right context
Create a context model over a database in the console's Context retriever section, then make an agent key.