chartcoach

MCP

Serve read-only chartcoach catalog SQL and optional indexed search tools over MCP.

The chartcoach MCP server exposes catalog SQL and optional indexed search tools for MCP clients. MCP, the Model Context Protocol, lets an agent client call server-provided tools during a session.

Inspect tool contracts without starting a server:

uvx --from 'chartcoach[mcp,index]@latest' chartcoach mcp tools --format json
uvx --from 'chartcoach[mcp]@latest' chartcoach mcp serve

The package selector after --from installs extras. Use chartcoach[mcp]@0.1.4 when the server must stay tied to one catalog release.

With no index configured, the server registers sql for read-only catalog SQL.

Extras

NeedExtraOne-off selector
Base query, read, cite, SQLnoneuvx chartcoach@latest ...
Indexed catalog findindexuvx --from 'chartcoach[index]@latest' chartcoach ...
MCP SQL servermcpuvx --from 'chartcoach[mcp]@latest' chartcoach ...
MCP search servermcp,indexuvx --from 'chartcoach[mcp,index]@latest' chartcoach ...

Tool contracts

ToolRegistered whenArgumentsReturn shape
sqlAlwaysstatement string, limit integer default 100columns, rows, row_count, truncated, limit, catalog_digest
searchOnly when --index or CHARTCOACH_INDEX is setsearch_query string, limit integer default 10, where string or null, mode auto, fts, vector, or hybridquery, mode, rows, row_count, limit, where, index_path, table_name

The sql tool accepts one read-only SELECT statement. The search tool returns candidate rows. Read exact ids before citing them.

Configure a client

For stdio clients, point the server command at uvx and pass the package with --from:

{
  "mcpServers": {
    "chartcoach": {
      "command": "uvx",
      "args": [
        "--from",
        "chartcoach[mcp,index]@latest",
        "chartcoach",
        "mcp",
        "serve",
        "--index",
        "/absolute/path/to/chartcoach-index"
      ]
    }
  }
}

Desktop clients often launch servers from a different working directory. Use absolute paths for --source and --index when a client configuration owns those values.

Run with the search extra and pass a LanceDB index. catalog find can resolve the package-pinned default index when --index is omitted. mcp serve does not auto-resolve that index because MCP server configuration should be explicit.

Use a caller-owned index when you want to choose the path:

uvx --from 'chartcoach[mcp,index]@latest' chartcoach catalog index create \
  --index ./chartcoach-index
uvx --from 'chartcoach[mcp,index]@latest' chartcoach mcp serve \
  --index ./chartcoach-index

To reuse the cached package-pinned index, resolve it with chartcoach catalog index info --format json and pass the returned path as --index.

INDEX_PATH="$(
  uvx --from 'chartcoach[mcp,index]@latest' chartcoach catalog index info --format json |
    jq -r '.[0].index_path'
)"
uvx --from 'chartcoach[mcp,index]@latest' chartcoach mcp serve --index "$INDEX_PATH"

When an index is available, the server also registers:

ToolBehavior
searchRun LanceDB search over indexed catalog document rows

The search table defaults to catalog_documents. Pass --table for another table name.

Catalog.open() and first CLI catalog reads download package-pinned artifacts. Indexed search downloads an index archive. Set CHARTCOACH_CACHE_DIR to isolate writes.

Source and runtime options

Environment variables mirror the main options.

VariableBehavior
CHARTCOACH_SOURCECatalog bundle, parquet file, authored folder, or metadata URL
CHARTCOACH_INDEXLanceDB database path or URI
CHARTCOACH_MCP_TRANSPORTstdio, sse, or streamable-http
CHARTCOACH_MCP_HOSTHost for HTTP transports
CHARTCOACH_MCP_PORTPort for HTTP transports
CHARTCOACH_MCP_LOG_LEVELDEBUG, INFO, WARNING, ERROR, or CRITICAL

SQL boundary

The sql tool accepts one SELECT statement. Multiple statements and mutating queries are rejected.

select g.id, g.title, s.role
from guidelines g
join sections s on s.guideline_id = g.id
where s.content ilike '%legend%'
limit 5

Use uvx chartcoach@latest catalog schema --tables --row-counts and uvx chartcoach@latest catalog schema to inspect table names and columns before configuring a client prompt.

On this page