ktx/packages/cli/src
Andrey Avtomonov b759a4a286
feat(mcp):added MCP server (#97)
* docs(specs): design research-agent MCP tools and ktx mcp daemon

Adds the 2026-05-14 design spec for exposing four new MCP tools
(discover_data, entity_details, dictionary_search, sql_execution),
shipping a ktx-research skill, and introducing an HTTP-only ktx mcp
daemon so external agents can use KTX as a research-capable context
layer.

* Refine research-agent MCP tools spec after adversarial review iteration 1

* Refine research-agent MCP tools spec after adversarial review iteration 2

* Refine research-agent MCP tools spec after adversarial review iteration 3

* Refine spec: drop connectionName compat carve-out and ground summary/snippet provenance per kind

* feat(daemon): validate read-only SQL with sqlglot

* feat(context): expose read-only SQL validation port

* feat(context): register MCP sql execution tool

* feat(context): execute MCP SQL through validated connector path

* test(context): update SQL analysis port fixtures

* docs: add research-agent MCP sql execution foundation plan

* feat(context): add scan-backed entity details service

* feat(context): register MCP entity details tool

* feat(context): expose local MCP entity details

* test(context): align entity details scan fixtures

* docs: add research-agent MCP entity_details plan

* feat(context): add dictionary search service

* feat(context): register MCP dictionary search tool

* feat(context): expose local MCP dictionary search

* docs: add research-agent MCP dictionary_search plan

* feat: add MCP discover data service

* feat: expose discover data MCP tool

* feat: wire local discover data MCP port

* docs: add research-agent MCP discover_data plan

* feat(cli): add mcp http security helpers

* feat(cli): host mcp over streamable http

* feat(cli): manage mcp daemon lifecycle

* feat(cli): add ktx mcp commands

* fix(cli): stabilize mcp daemon verification

* docs: add research-agent MCP http daemon plan

* feat(cli): install KTX research skill

* feat(cli): configure MCP clients in setup agents

* feat(cli): support Claude local MCP setup scope

* docs: add research-agent MCP setup-agents plan

* refactor(context): use connectionId in warehouse verification tools

* docs(context): update ingest verification prompts for connectionId

* docs: add research-agent MCP ingest contract convergence plan

* chore: build runtime artifacts in conductor setup

---------

Co-authored-by: Andrey Avtomonov <7889985+andreybavt@users.noreply.github.com>
2026-05-15 02:35:09 +02:00
..
commands feat(mcp):added MCP server (#97) 2026-05-15 02:35:09 +02:00
io Remove deleted CLI command remnants (#105) 2026-05-14 19:04:22 -04:00
skills/research feat(mcp):added MCP server (#97) 2026-05-15 02:35:09 +02:00
bin.ts rename klo to ktx 2026-05-10 23:51:24 +02:00
clack.ts feat(cli): improve setup progress UX (#69) 2026-05-13 17:01:48 +02:00
cli-program.test.ts refactor(cli): extract buildKtxProgram for reuse outside runCommanderKtxCli 2026-05-13 00:23:58 +02:00
cli-program.ts feat(mcp):added MCP server (#97) 2026-05-15 02:35:09 +02:00
cli-runtime.ts feat(mcp):added MCP server (#97) 2026-05-15 02:35:09 +02:00
command-schemas.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
command-tree.test.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
command-tree.ts fix(cli): preserve tree continuation guides 2026-05-13 00:35:07 +02:00
connection.test.ts feat(context): add driver-discriminated connection schemas (#96) 2026-05-15 00:08:11 +02:00
connection.ts feat(cli): extend ktx connection test to every supported driver (#92) 2026-05-14 16:21:18 +02:00
context-build-view.test.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
context-build-view.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
database-tree-picker.test.ts feat(cli): tree-picker UI for database scope selection (#81) 2026-05-13 18:41:44 -04:00
database-tree-picker.ts feat(cli): tree-picker UI for database scope selection (#81) 2026-05-13 18:41:44 -04:00
demo-assets.test.ts feat: rename project wiki directory (#66) 2026-05-13 16:05:58 +02:00
demo-assets.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
demo-metrics.test.ts rename klo to ktx 2026-05-10 23:51:24 +02:00
demo-metrics.ts rename klo to ktx 2026-05-10 23:51:24 +02:00
dev.test.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
dev.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
doctor.test.ts Remove deleted CLI command remnants (#105) 2026-05-14 19:04:22 -04:00
doctor.ts Remove deleted CLI command remnants (#105) 2026-05-14 19:04:22 -04:00
example-smoke.test.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
index.test.ts feat(mcp):added MCP server (#97) 2026-05-15 02:35:09 +02:00
index.ts feat(cli)!: remove ktx agent command (#58) 2026-05-13 13:01:56 +02:00
ingest-depth.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
ingest-query-executor.test.ts feat(context): add warehouse verification tools (#46) 2026-05-13 13:43:23 +02:00
ingest-query-executor.ts feat(context): add warehouse verification tools (#46) 2026-05-13 13:43:23 +02:00
ingest-report-file.test.ts rename klo to ktx 2026-05-10 23:51:24 +02:00
ingest-report-file.ts rename klo to ktx 2026-05-10 23:51:24 +02:00
ingest-viz.test.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
ingest.test-utils.ts feat(context): add driver-discriminated connection schemas (#96) 2026-05-15 00:08:11 +02:00
ingest.test.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
ingest.ts feat(cli): friendly missing-project status and per-project daemon state (#87) 2026-05-14 14:35:55 +02:00
knowledge.test.ts Remove deleted CLI command remnants (#105) 2026-05-14 19:04:22 -04:00
knowledge.ts Remove deleted CLI command remnants (#105) 2026-05-14 19:04:22 -04:00
local-adapters.test.ts feat(mcp):added MCP server (#97) 2026-05-15 02:35:09 +02:00
local-adapters.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
local-scan-connectors.test.ts feat(context): add driver-discriminated connection schemas (#96) 2026-05-15 00:08:11 +02:00
local-scan-connectors.ts fix: clean up ktx yaml config parameters (#75) 2026-05-14 01:27:31 +02:00
managed-local-embeddings.test.ts feat(cli): friendly missing-project status and per-project daemon state (#87) 2026-05-14 14:35:55 +02:00
managed-local-embeddings.ts feat(cli): friendly missing-project status and per-project daemon state (#87) 2026-05-14 14:35:55 +02:00
managed-mcp-daemon.test.ts feat(mcp):added MCP server (#97) 2026-05-15 02:35:09 +02:00
managed-mcp-daemon.ts feat(mcp):added MCP server (#97) 2026-05-15 02:35:09 +02:00
managed-python-command.test.ts feat(cli): friendly missing-project status and per-project daemon state (#87) 2026-05-14 14:35:55 +02:00
managed-python-command.ts feat(cli): clean up command surface 2026-05-12 23:51:46 +02:00
managed-python-daemon.test.ts feat(cli): friendly missing-project status and per-project daemon state (#87) 2026-05-14 14:35:55 +02:00
managed-python-daemon.ts feat(cli): friendly missing-project status and per-project daemon state (#87) 2026-05-14 14:35:55 +02:00
managed-python-http.test.ts feat(cli): friendly missing-project status and per-project daemon state (#87) 2026-05-14 14:35:55 +02:00
managed-python-http.ts feat(cli): friendly missing-project status and per-project daemon state (#87) 2026-05-14 14:35:55 +02:00
managed-python-runtime.test.ts feat(cli): friendly missing-project status and per-project daemon state (#87) 2026-05-14 14:35:55 +02:00
managed-python-runtime.ts feat(cli): friendly missing-project status and per-project daemon state (#87) 2026-05-14 14:35:55 +02:00
mcp-http-server.test.ts feat(mcp):added MCP server (#97) 2026-05-15 02:35:09 +02:00
mcp-http-server.ts feat(mcp):added MCP server (#97) 2026-05-15 02:35:09 +02:00
memory-flow-hud.tsx feat: rename project wiki directory (#66) 2026-05-13 16:05:58 +02:00
memory-flow-interactive.test.ts feat: rename project wiki directory (#66) 2026-05-13 16:05:58 +02:00
memory-flow-interactive.ts rename klo to ktx 2026-05-10 23:51:24 +02:00
memory-flow-tui.test.tsx feat: rename project wiki directory (#66) 2026-05-13 16:05:58 +02:00
memory-flow-tui.tsx chore: add TypeScript dead-code checks (#60) 2026-05-13 13:33:28 +02:00
next-steps.test.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
next-steps.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
notion-page-picker.test.ts feat(cli): tree-picker UI for database scope selection (#81) 2026-05-13 18:41:44 -04:00
notion-page-picker.ts feat(cli): tree-picker UI for database scope selection (#81) 2026-05-13 18:41:44 -04:00
print-command-tree.test.ts feat(mcp):added MCP server (#97) 2026-05-15 02:35:09 +02:00
print-command-tree.ts feat(cli): add print-command-tree build-time script 2026-05-13 00:25:35 +02:00
project-dir.test.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
project-resolver.test.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
project-resolver.ts rename klo to ktx 2026-05-10 23:51:24 +02:00
prompt-navigation.test.ts feat(cli): prefix text-input continuation lines with box-drawing characters 2026-05-12 16:58:00 -07:00
prompt-navigation.ts feat(cli): prefix text-input continuation lines with box-drawing characters 2026-05-12 16:58:00 -07:00
public-ingest-copy.test.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
public-ingest-copy.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
public-ingest.test.ts feat(context): add driver-discriminated connection schemas (#96) 2026-05-15 00:08:11 +02:00
public-ingest.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
runtime.test.ts feat(cli): friendly missing-project status and per-project daemon state (#87) 2026-05-14 14:35:55 +02:00
runtime.ts feat(cli): friendly missing-project status and per-project daemon state (#87) 2026-05-14 14:35:55 +02:00
scan.test.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
scan.ts fix(context): merge overlay columns onto manifest columns by name (#94) 2026-05-15 02:11:04 +02:00
setup-agents.test.ts feat(mcp):added MCP server (#97) 2026-05-15 02:35:09 +02:00
setup-agents.ts feat(mcp):added MCP server (#97) 2026-05-15 02:35:09 +02:00
setup-context.test.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
setup-context.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
setup-database-context-depth.ts feat(cli): enforce required database selection and improve tree-picker UX (#86) 2026-05-14 14:35:58 +02:00
setup-databases.test.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
setup-databases.ts feat(cli): enforce required database selection and improve tree-picker UX (#86) 2026-05-14 14:35:58 +02:00
setup-demo-tour.test.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
setup-demo-tour.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
setup-embeddings.test.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
setup-embeddings.ts feat(cli): friendly missing-project status and per-project daemon state (#87) 2026-05-14 14:35:55 +02:00
setup-interrupt.test.ts fix(cli): clean up connection commands (#62) 2026-05-13 15:04:50 +02:00
setup-interrupt.ts fix(cli): clean up connection commands (#62) 2026-05-13 15:04:50 +02:00
setup-models.test.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
setup-models.ts refactor(cli): remove Vertex AI auth step and add gcloud retry (#84) 2026-05-13 19:49:49 -04:00
setup-project.test.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
setup-project.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
setup-prompts.test.ts feat(cli): improve setup progress UX (#69) 2026-05-13 17:01:48 +02:00
setup-prompts.ts feat(cli): improve setup progress UX (#69) 2026-05-13 17:01:48 +02:00
setup-ready-menu.test.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
setup-ready-menu.ts feat: merge ingest and scan 2026-05-14 01:43:06 +02:00
setup-secrets.test.ts rename klo to ktx 2026-05-10 23:51:24 +02:00
setup-secrets.ts rename klo to ktx 2026-05-10 23:51:24 +02:00
setup-sources.test.ts feat(context): add driver-discriminated connection schemas (#96) 2026-05-15 00:08:11 +02:00
setup-sources.ts feat(context): add driver-discriminated connection schemas (#96) 2026-05-15 00:08:11 +02:00
setup.test.ts feat(context): add driver-discriminated connection schemas (#96) 2026-05-15 00:08:11 +02:00
setup.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
sl.test.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
sl.ts fix(context): merge overlay columns onto manifest columns by name (#94) 2026-05-15 02:11:04 +02:00
source-mapping.ts fix(cli): clean up connection commands (#62) 2026-05-13 15:04:50 +02:00
standalone-smoke.test.ts fix: remove project from ktx config (#95) 2026-05-14 17:39:31 +02:00
startup-profile.ts rename klo to ktx 2026-05-10 23:51:24 +02:00
status-project.ts Remove deleted CLI command remnants (#105) 2026-05-14 19:04:22 -04:00
text-ingest.test.ts feat(cli): add text ingest command (#72) 2026-05-13 19:32:49 +02:00
text-ingest.ts feat(cli): add text ingest command (#72) 2026-05-13 19:32:49 +02:00
tree-picker-state.test.ts feat(cli): enforce required database selection and improve tree-picker UX (#86) 2026-05-14 14:35:58 +02:00
tree-picker-state.ts feat(cli): enforce required database selection and improve tree-picker UX (#86) 2026-05-14 14:35:58 +02:00
tree-picker-tui.test.tsx feat(cli): enforce required database selection and improve tree-picker UX (#86) 2026-05-14 14:35:58 +02:00
tree-picker-tui.tsx feat(cli): enforce required database selection and improve tree-picker UX (#86) 2026-05-14 14:35:58 +02:00
viz-fallback.test.ts Initial open-source release 2026-05-10 23:12:26 +02:00
viz-fallback.ts rename klo to ktx 2026-05-10 23:51:24 +02:00