Skip to content

Conversation

@codefromthecrypt
Copy link
Collaborator

@codefromthecrypt codefromthecrypt commented Dec 22, 2025

Summary

Switches to the sacp library and adds support for MCP servers passed from ACP clients.

This means that any ACP editor can portably pass an MCP server to Goose the same way as another agent like Gemini, Codex or Claude.

Why sacp?

  • Handler-based API vs manual trait implementation
  • Supports bidirectional requests (agent can request permissions FROM client)
  • using the symposium crates, because the SDK donated ones aren't published yet.

Notes:

  • Bidirectional permission flow: Tool confirmations send RequestPermissionRequest to the client, which responds with approval/denial.
  • Http transport: Supports both stdio (required by spec) and http (e.g., kiwi MCP server)
  • SSE rejected: Deprecated in rmcp 0.10+

Type of Change

  • Feature
  • Refactor / Code quality
  • Tests

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

  • Integration tests:
    • test_acp_with_mcp_http_server: Spins up real MCP HTTP server with sum tool, tests full flow (prompt → tool call → tool result → answer)
  • Manual: Zed + kiwi MCP server + goose (on this branch):
  "context_servers": {
    "kiwi": {
      "url": "https://mcp.kiwi.com",
    },
  },
  "agent_servers": {
    "goose": {
      "type": "custom",
      "command": "/Users/codefromthecrypt/oss/goose/target/release/goose",
      "args": ["acp"],
      "env": {},
    },
  },
Screenshot 2025-12-22 at 4 23 05 PM

Related Issues

Closes #6111

@codefromthecrypt codefromthecrypt changed the title feat(acp): Honor MCP servers from clients (Stdio + Http) feat(acp): Honor MCP servers from clients like Zed (stdio + http) Dec 22, 2025
@codefromthecrypt codefromthecrypt marked this pull request as ready for review December 22, 2025 08:41
@codefromthecrypt codefromthecrypt marked this pull request as draft December 22, 2025 22:23
@codefromthecrypt
Copy link
Collaborator Author

codefromthecrypt commented Dec 22, 2025

since this isn't approved yet anyway, i'll await a pending release from sacp that should be going out today and work any changes in. Also, I did the same MCP integration test in another agent and found it was serving the answer 1+1 from memory and not calling tools.

So, I will change the fake MCP server to something an LLM can't guess. (regardless this isnt an issue here as we are pre-canning responses, but I want to set a good example)

@codefromthecrypt
Copy link
Collaborator Author

tested with nvim yetone/avante.nvim#2883
image

Use sacp (symposium-dev/symposium-acp) which provides struct literals
over builders and direct notification dispatch via JrConnectionCx.
This crate is slated to become the canonical agentclientprotocol/rust-sdk
implementation.

Signed-off-by: Adrian Cole <[email protected]>
- Convert McpServer from ACP schema to ExtensionConfig
- Stdio: command, args, env vars
- Http: url, headers (StreamableHttp transport)
- SSE: explicitly not supported (panics)
- Inline Calculator MCP server in integration tests
- Implement permission flow using await_when_result_received pattern
- Use provider tool call ID directly (matching other ACP agents)
- Add serde snake_case rename to Permission enum for drift-free conversion

Note: rmcp version (0.9.1) matches sacp from https://github.com/symposium-dev/symposium-acp
Fixes #6111

Signed-off-by: Adrian Cole <[email protected]>
@codefromthecrypt codefromthecrypt marked this pull request as ready for review December 23, 2025 02:49
Copilot AI review requested due to automatic review settings December 23, 2025 02:49
@codefromthecrypt
Copy link
Collaborator Author

bringing this up for review. the next sacp upgrade will be mechanical and not need much review. better to not hold this change hostage to it.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR switches goose's ACP implementation from the agent-client-protocol library to the sacp (symposium-acp) library, adding support for MCP servers passed from ACP clients. The refactor enables bidirectional permission requests and adds support for both stdio and HTTP transports for MCP servers.

Key changes:

  • Replaces agent-client-protocol with sacp library for handler-based API
  • Implements bidirectional permission flow for tool confirmations via RequestPermissionRequest
  • Adds HTTP transport support for MCP servers (e.g., kiwi MCP server)

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/goose-cli/src/commands/acp.rs Complete rewrite to use sacp's handler-based API; adds MCP server conversion and bidirectional permission handling
crates/goose-cli/Cargo.toml Replaces agent-client-protocol dependency with sacp 9.0.0
crates/goose/Cargo.toml Adds sacp dev-dependency and rmcp streamable-http-server feature for tests
crates/goose-mcp/Cargo.toml Updates rmcp from 0.8.1 to 0.10.0
crates/goose/tests/acp_integration_test.rs Rewrites ACP tests to use sacp; adds HTTP MCP server integration test
crates/goose/tests/common.rs Extracts shared test binary building logic; adds GOOSE_BINARY constant
crates/goose/tests/mcp_integration_test.rs Refactors to use shared common module for binary paths
crates/goose/src/permission/permission_confirmation.rs Adds PartialEq and Eq derives for test assertions
crates/goose/src/agents/extension.rs Adds PartialEq derive for ExtensionConfig and Envs for test assertions
crates/goose/tests/test_data/*.txt Adds new test data files for OpenAI mock responses
Cargo.lock Updates dependencies for sacp, rmcp, tokio, and transitive dependencies

Signed-off-by: Adrian Cole <[email protected]>

[dependencies]
rmcp = { version = "0.8.1", features = ["server", "client", "transport-io", "macros"] }
rmcp = { workspace = true, features = ["server", "client", "transport-io", "macros"] }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change? was this one just inconsistent?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah just to have it match versions. copilot insisted ;)

@codefromthecrypt codefromthecrypt merged commit 23f33e3 into main Dec 23, 2025
20 checks passed
@codefromthecrypt codefromthecrypt deleted the finish-mcp branch December 23, 2025 21:49
@codefromthecrypt
Copy link
Collaborator Author

Thanks for the look @alexhancock and happy holidays!

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.

feat(acp): Honor MCP servers passed from ACP clients

3 participants