Cua Docs

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. It is re-crawled daily via Modal. 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:

NameTypeDescription
sqlstringSQL 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:

NameTypeDescription
querystringNatural language query, embedded and matched against documentation vectors.
limitintMaximum number of matches. Default 10, maximum 100.
wherestring, optionalSQL-like filter, for example category = 'cua'.
selectlist of strings, optionalColumns 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:

NameTypeDescription
sqlstringSQL 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:

NameTypeDescription
querystringNatural language query, embedded and matched against code vectors.
limitintMaximum number of matches. Default 10, maximum 100.
wherestring, optionalSQL-like filter, for example version = '0.7.3'.
selectlist of strings, optionalColumns to return.
componentstring, optionalComponent 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.

ColumnTypeDescription
idINTEGER PRIMARY KEYRow identifier.
urlTEXTUnique full URL of the page.
titleTEXTPage title.
categoryTEXTCategory, for example cua, cuabench, or llms.txt.
contentTEXTPlain text content with markdown stripped.

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.

ColumnTypeDescription
idINTEGER PRIMARY KEYRow identifier.
componentTEXTComponent name, for example agent or computer.
versionTEXTVersion string, for example 0.7.3.
file_pathTEXTPath to the file within the component.
contentTEXTFull source content.
languageTEXTProgramming language.
UNIQUE(component, version, file_path)constraintUnique 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

Source code is indexed per released version. Each row in code_files is keyed by (component, version, file_path), so the same file exists once per version it appeared in. Components are named units such as agent and computer. Versions are release strings such as 0.7.3, drawn from the project's git tags.

A query can target one version, compare across versions, or enumerate them, for example SELECT DISTINCT version FROM code_files WHERE component = 'agent'. The index is rebuilt daily.