Skip to content

Move the MCP server into Rust, hosted by the app and yaak mcp - #752

Merged
gschier merged 5 commits into
mainfrom
t3code/rust-mcp-server
Oct 15, 2026
Merged

gschier merged 5 commits into
mainfrom
t3code/rust-mcp-server

Conversation

@gschier

@gschier gschier commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Replaces the @yaak/mcp-server plugin with crates/yaak-mcp on rmcp 3.5, PR 4 of the Yaak Proxy plan (proxy tools come in 4b).

  • yaak-mcp: the plugin's 15 tools, same names, input schemas and output text, written against an McpHost trait. Stdio transport, and streamable HTTP that requires Authorization: Bearer <token>.
  • CLI: yaak mcp serves stdio with the CLI's own queries and send path. -e and --cookie-jar act as the active environment and jar; toasts go to stderr.
  • App: serves 127.0.0.1:64343/mcp while the new mcpServerEnabled setting is on (default off), starting and stopping when it changes. The token is generated on first start and kept in key_values. The plugin's send handler is now send_http_request_in_window, shared with MCP.
  • Settings > Agents (hidden on the web through a new agents platform capability): the Yaak CLI with status, install prompt, and agent skill; the app's MCP server toggle and token; and Connect an agent, with setup for Claude Code, Codex, Cursor, VS Code, and other MCP clients through the CLI or the app. The menu's Install CLI item opens this tab.
  • The local model-event loop in models_ext.rs moved to its own thread. It blocks in recv(), so as a runtime task it parked a worker, and anything spawned from it (the settings sync) sat in that worker's LIFO slot until a later spawn pushed it out.
  • Plugin: deprecation toast and README note. Not removed, plugin API unchanged.

Differences from the plugin: list_workspaces drops the internal _label and lists a workspace open in two windows once; send_http_request JSON keys come out alphabetical (it still returns metadata only, no body, as before). Old mcp-remote configs need the header now. With the plugin still installed, the built-in server can't bind 64343 and says so in a toast.

Agents settings
Connect an agent

Tests

cargo test -p yaak-mcp -p yaak-cli: per-tool tests on the CLI host against a temp DB through an rmcp client (the plugin's five send cases included), end-to-end tests spawning yaak mcp (including one where an MCP send's environment and cookie jar reach response.* and cookie.value), and an HTTP auth test (401 without or with a wrong token, 404 off /mcp).

Claude Code → yaak mcp (stdio)

> list_workspaces {}                       < [{"id":"wk_5o2qcrAHCL","name":"MCP Demo"}]
> list_http_requests {"workspaceId":...}   < [{"model":"http_request","id":"rq_yVyUXzUoqU","name":"Hello",...}]
> send_http_request {"id":"rq_yVyUXzUoqU"} < {"model":"http_response","status":200,"contentLength":42,"elapsed":12,...}
> create_folder {"name":"Smoke Tests"}     < {"model":"folder","id":"fl_4yjmyWaM8Q",...}
> create_http_request {"name":"Echo","method":"POST","folderId":"fl_4yjmyWaM8Q","bodyType":"application/json","body":{"text":"{\"ok\": true}"},...}
                                           < {"model":"http_request","id":"rq_gwtcEoSX7D",...}

Claude Code → app via mcp-remote (token redacted)

> list_workspaces {}                       < [{"id":"wk_m9Q74jFJUs","name":"App MCP Demo"}]
> get_environment_id {}                    < No environment selected
> list_http_requests {}                    < [{"id":"rq_R9wAYFqiDb","name":"Hello",...}]
> send_http_request {"id":"rq_R9wAYFqiDb"} < {"status":200,"contentLength":42,"elapsed":54,...}
> show_toast {"message":"Hello from Claude Code over MCP","color":"success"}
                                           < ✓ Toast shown: "Hello from Claude Code over MCP"

In the app, one tick of the setting starts the listener and one untick stops it (app log), and the sent request shows its saved 200 in the sidebar.

… mcp`

The @yaak/mcp-server plugin's tools move to crates/yaak-mcp on rmcp,
written against an McpHost trait. The client app serves them over
streamable HTTP on 127.0.0.1:64343 behind a new MCP server setting and a
bearer token; the CLI serves them over stdio as `yaak mcp`. The plugin
now shows a deprecation toast pointing at the setting.
@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge; the latest change fixes the web menu issue without introducing a new failure.

Summary

Moves MCP tools into Rust, served through yaak mcp over stdio or through the app over authenticated localhost HTTP.

  • Yaak's MCP tools now run from a shared Rust server.
  • The Yaak CLI serves MCP tools through yaak mcp.
  • The desktop app can host an authenticated MCP server on localhost.
  • Settings > Agents shows how to connect AI clients to Yaak.
  • The app handles local model updates on a separate thread.
  • The old MCP plugin now directs users to Yaak's built-in server.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Agent[AI agent] -->|stdio| CLI[yaak mcp]
  Agent -->|HTTP with bearer token| App[App MCP server]
  CLI --> Tools[Shared Rust MCP tools]
  App --> Tools
  Tools --> Host[McpHost]
  Host --> Data[Workspace data and request sends]
Loading

Reviews (3) · Last reviewed commit: "Hide the Install CLI menu item where age..." · Reviewed by Greptile

Comment thread crates-cli/yaak-cli/src/commands/mcp.rs
Comment thread crates-tauri/yaak-app-client/src/mcp_ext.rs Outdated
@gschier

gschier commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

@greptileai review

Comment thread apps/yaak-client/components/SettingsDropdown.tsx
@gschier

gschier commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

@greptileai review

@gschier
gschier merged commit 72b43f7 into main Oct 15, 2026
6 checks passed
@gschier
gschier deleted the t3code/rust-mcp-server branch October 15, 2026 04:51
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