NCI
Reference · MCP methods

MCP method registry

nci-mcp registers exactly two tools and three resources. There are no other methods, no admin tools, no hidden helpers — the table below is the complete surface.

Tools

ToolSchemaReturns
nci_query

Discriminated union over subcommand: find, symbol, show, snippet, overloads, packages, package_versions, package_deps, source_packages, active_package, symbols, evidence. Optional database overrides the resolved DB path.

CLI envelope {ok:true, data:…, meta:…} on success, {ok:false, error:…} on failure.
nci_sql

Optional database, schema, command, sql_parts, max_rows (default 500 when not in schema mode), format (json default, jsonl, plain). At least one of schema:true, command, or sql_parts is required. When schema is true, the MCP does not pass --max-rows (DDL-only path).

Raw row array (no envelope). --max-rows failures surface as MCP errors.

The full input schemas live in packages/nci-mcp/src/nci-query.ts and nci-sql.ts and are exported as zod schemas — read those files when a client wants the canonical shape.

Resources

URIMimeWhat it returns
nci://primer/agenttext/markdownCompact NCI-first workflow primer. Same text shown at /docs/primer.
nci://primer/referencetext/markdownTabular schema reference: tables, columns, joins, edge cases.
nci://database/activeapplication/jsonRead-only snapshot from nci db status --format json — path, size, schema_version, indexer_output_revision, engine_version. Strictly informational.

Server identity

The MCP server announces itself as name: "nci-mcp" with a version that matches its npm package version. The server’s instructions string (set in packages/nci-mcp/src/index.ts) tells the agent to read nci://primer/agent first — the same advice rendered at Agent primer.