Your database is an MCP server
GreyCat is AI-agent-native: a built-in Model Context Protocol server, on-device embeddings and vector search for private RAG, and an open skills marketplace that teaches agents to write GreyCat.
Built-in MCP server
Two annotations turn an ordinary function into an AI-agent tool:
@expose
@tag("openapi", "mcp")
fn add(a: int, b: int): int { return a + b; }
That single function is now a REST endpoint, an OpenAPI operation and a callable MCP tool. The tool schema is auto-generated from the function signature, the call is governed by the same role-based access control (RBAC) as the rest of the API, and it is served on the same port by one binary — no sidecar and no separate gateway to deploy.
GreyCat's MCP server implements the core of the protocol: initialize for the handshake,
tools/list so an agent can discover every exposed function, and tools/call to
invoke them. Because the same signature drives REST, OpenAPI and MCP, an agent and a human developer are
always looking at exactly the same contract.
Private, on-device RAG
GreyCat stores vectors in a built-in VectorIndex and generates embeddings
in-process via a statically-linked build of llama.cpp — so retrieval-augmented generation
runs without sending your data to an external embedding API. Prompts, documents and vectors stay inside your
deployment.
Because everything lives in one engine, you can combine vector similarity, BM25 keyword ranking and graph
traversal in a single store. The text_search library exposes hybrid search that fuses keyword
and vector results, so an agent can retrieve by meaning, by exact term and by relationship in the same
query.
On-device LLM text generation is on the roadmap. Today the live AI surface is on-device embeddings, vector search and the MCP server; external LLMs call GreyCat through MCP.
Agent skills marketplace
DataThings publishes an open marketplace of AI-agent plugins and skills at github.com/datathings/marketplace. Add it and install the GreyCat skill in two commands:
/plugin marketplace add datathings/marketplace
/plugin install greycat@datathings
The greycat skill teaches an AI agent to scaffold, write, optimize, typecheck and migrate
GreyCat code — so your agent produces idiomatic GCL instead of guessing. The marketplace also ships skills
for llama.cpp, ggml, vLLM, Ollama and GPU stacks.
Point your agent at GreyCat
Once GreyCat is served with greycat serve, any MCP-capable client — Claude, Cursor, VS Code
and others — can connect, discover its tools via tools/list, and call them via
tools/call. The agent works against the exact functions you chose to expose, under the same
permissions as every other caller, with no extra glue code in between.