Skip to content

feat(windows): MCP server with External clients, and the tablepro command - #4326

Merged
datlechin merged 11 commits into
mainfrom
feat/windows-mcp-cli
Nov 19, 2026
Merged

datlechin merged 11 commits into
mainfrom
feat/windows-mcp-cli

Conversation

@datlechin

@datlechin datlechin commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Core FFI (C-18): Core::mcp_server runs tablepro-mcp on the sessions connect_saved opened, with the token in the core's secret store and an McpAppHost callback that opens a connection and asks about a client's write.
  • ConnectionRecord.external_access reads the External Clients level back; a save without it keeps the stored one.
  • The MCP server on Windows serves only programs of its own user, by the token user of the peer's process (tablepro_net::loopback_peer_is_this_user). Off Linux it served every local account before.
  • tablepro-cli (C-20) takes the app's names for its settings and token store through Host::places; Linux's text is unchanged. completion powershell prints a script.
  • The ffi package builds tablepro-cli.exe: it reads the data folder, the MCP settings and the token as the app keeps them, checks the listener's user before it sends the token, and hands files and links to TablePro.exe.
  • Windows (W-58, W-52 MCP part): Settings has an MCP server section: switch, status with Try again, port, address and Authorization header to copy, Regenerate token, clients seen.
  • The connection form's Options has External clients: Blocked, Read only, Read and write.
  • A client's write asks in its connection's window, whatever the Safe Mode level. A client's connect opens the connection as Connect does.
  • W-62: the package's tablepro.exe alias moves to a console Application over tablepro-cli.exe. Files and links it starts TablePro.exe with, which opens them through feat(windows): connect links, file types, long-run notifications, type editors and a JSON view #4325's activation handling.
  • ADRs: core 0036 and windows 0019. Core ADR 0018 and windows ADR 0004 point to them.
  • Test changed on purpose: usage_errors_exit_two no longer lists completion powershell, which now prints a script.
  • Not in this PR: client setup from the shared catalog. The catalog has no Windows entries and its install code lives in linux/crates/app.

Test plan

  • cargo test -p tablepro-ffi --test mcp: the command reaches an open connection and never a Blocked one, a write runs only once the app approves, a terminal's connect opens through the app, the token outlives a stop and a new one turns the old away, a taken port is reported.
  • cargo test -p tablepro-cli and -p tablepro-net. The Windows peer-user check runs in core.yml's loopback tests.
  • dotnet test: McpServerTests (Interop, real core) and the App.Model tests for the settings names the command reads and the form's level.
  • UI tests run tablepro-cli.exe against the published app: a query, status, --version and PowerShell completion, a write refused under Read only, and a write that waits for the question and runs on Run.
  • release-windows.yml dry run on this branch (run 44350396329): both MSIX build with the second Application, install, and TheInstalledPackageStarts runs status through the installed tablepro.exe alias on Windows 11 Arm64 and Windows Server 2022.

Screenshots

New surfaces, so no before shots. From the Windows (x64) UI tests.

Light Dark
Settings, MCP server, light Settings, MCP server, dark
External clients, light External clients, dark
A client's write, light A client's write, dark

@datlechin
datlechin enabled auto-merge (squash) November 19, 2026 11:36
# Conflicts:
#	core/docs/decisions/README.md
@datlechin
datlechin merged commit 656d8f4 into main Nov 19, 2026
47 checks passed
@datlechin
datlechin deleted the feat/windows-mcp-cli branch November 20, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant