Docs & Code MCP Server
Reference for the hosted Cua Docs & Code MCP Server: endpoint, the four read-only query tools, database tables, and version indexing.
The Docs & Code MCP Server is a hosted MCP server exposing read-only search over Cua's documentation and versioned source code. The endpoint is https://vk-mcp.cua.ai/mcp over the streamable-HTTP transport. The Docs & Code MCP Server is backed by SQLite FTS5 for keyword search and LanceDB embeddings using all-MiniLM-L6-v2, 384-dimensional vectors, for semantic search. The crawler is scheduled daily; that schedule alone does not establish the freshness of a serving index. All tools are read-only. SQL tools accept SELECT queries only.
Tools#
query_docs_db#
SQL query against the documentation database, read-only and SELECT only.
Parameters:
| Name | Type | Description |
|---|---|---|
sql | string | SQL SELECT query against the docs database. |
Returns a list of rows as objects keyed by column name.
This tool targets the docs database, including the pages table and the pages_fts FTS5 virtual table.
query_docs_vectors#
Vector similarity search over the documentation embeddings, read-only.
Parameters:
| Name | Type | Description |
|---|---|---|
query | string | Natural language query, embedded and matched against documentation vectors. |
limit | int | Maximum number of matches. Default 10, maximum 100. |
where | string, optional | SQL-like filter, for example category = 'reference'. |
select | list of strings, optional | Columns to return. The vector column is always excluded. |
Returns matching document chunks with a _distance similarity score.
query_code_db#
SQL query against the code database, read-only and SELECT only.
Parameters:
| Name | Type | Description |
|---|---|---|
sql | string | SQL SELECT query against the code database. |
Returns a list of rows as objects keyed by column name.
This tool targets the code database, including the code_files table and the code_files_fts FTS5 virtual table.
query_code_vectors#
Vector similarity search over the code embeddings, read-only.
Parameters:
| Name | Type | Description |
|---|---|---|
query | string | Natural language query, embedded and matched against code vectors. |
limit | int | Maximum number of matches. Default 10, maximum 100. |
where | string, optional | SQL-like filter, for example version = '0.7.3'. |
select | list of strings, optional | Columns to return. |
component | string, optional | Component name to restrict the search. |
Returns matching code chunks with a _distance similarity score.
Database tables#
The SQL tools query two SQLite tables and their FTS5 companions.
pages#
Documentation pages.
| Column | Type | Description |
|---|---|---|
id | INTEGER PRIMARY KEY | Row identifier. |
url | TEXT | Unique full URL of the page. |
title | TEXT | Page title. |
category | TEXT | URL category, for example concepts, how-to-guides, reference, or tutorials. |
content | TEXT | Plain text content with markdown stripped. |
build_id | TEXT | Paired-generation identifier; available after the migration described below. |
The pages_fts FTS5 virtual table mirrors pages for full text search. The content column is indexed. The url, title, and category columns are unindexed.
code_files#
Versioned source code files.
| Column | Type | Description |
|---|---|---|
id | INTEGER PRIMARY KEY | Row identifier. |
component | TEXT | Component name, for example agent or computer. |
version | TEXT | Version string, for example 0.7.3. |
file_path | TEXT | Path to the file within the component. |
content | TEXT | Full source content. |
language | TEXT | Programming language. |
UNIQUE(component, version, file_path) | constraint | Unique source file identity within a component version. |
The code_files_fts FTS5 virtual table mirrors code_files for full text search. The content column is indexed. The component, version, and file_path columns are unindexed.
Version indexing#
The indexer derives component and version labels from parseable repository tags.
Each row is keyed by (component, version, file_path). A component label identifies
a tag family; it does not establish that a standalone product's implementation is
covered. At each tag, the indexer scans matching source files across the repository.
The source filter covers Python (.py), TypeScript (.ts, .tsx), and JavaScript
(.js). It does not index Rust or Swift files. SQLite includes files up to
1,000,000 decoded characters, and vector search includes files up to 100,000
decoded characters.
Enumerate the serving index before relying on a component, version, or language:
SELECT DISTINCT component FROM code_files;
SELECT DISTINCT language FROM code_files;
SELECT DISTINCT version FROM code_files WHERE component = 'agent';The source jobs are scheduled daily. A successful build, publication, and reader refresh are all required for updated content to reach this endpoint. SQL and vector results must be checked separately; a page in SQL does not by itself establish vector availability.
Docs generation identity#
The paired-generation reader exposes index_metadata through query_docs_db:
SELECT build_id, corpus_id, captured_at, source FROM index_metadata;Docs rows and vector chunks carry the same build_id. The generation manifest
records the discovered URL set and any pages excluded because they contain no
searchable text. Short pages are included in both indexes.
This schema requires deployment of the paired-generation writer, storage consumer,
and reader. An endpoint without index_metadata is serving the older schema;
its crawl schedule does not prove corpus parity. Operators can find the generation
layout and rollout contract in the repository's docs/scripts/README.md.