Skip to content

Conversation

@dingfeli
Copy link
Contributor

@dingfeli dingfeli commented Nov 4, 2025

Issue #, if available:

Description of changes:

  • Adds support to http transport
  • Slight architectural changes where the instantiation of McpServerActor is given a mpsc::Sender<McpServerActorEvent> as opposed to each McpServerActor having to spawn their own pair. This is because this allows us to poll a single mpsc::Receiver<McpServerActorEvent>, as compared to before, where we have to call recv on all of the McpServerActor and putting them all a collection impl Future.

Changes since review 1:

  • adds method to see if mcp config is disabled
  • changes mpsc to broadcast for mcp_main_loop_to_handle_server_event_rx
  • expands path using provided util function
  • uses event buffer for mcp events
  • relocates server event sender to main loop
  • restores use of oneshot in server launch
  • propagates appropriate messages to prevent leaky abstractions

Tests
Test case: cached credentials, making tool calls (this was ran before the decoupling of Model from the agent crate):

➜  amazon-q-developer-cli jj:(dingfeli/adds-http-support-agent-crate) ✗ RUST_LOG=trace cargo run -p agent -- run --agent=test_test --dangerously-trust-all-tools "what notion docs do i have"
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.13s
     Running `target/debug/agent run --agent=test_test --dangerously-trust-all-tools 'what notion docs do i have'`
I'll search your Notion workspace to see what documents you have available.
{
  "toolUseId": "tooluse_e6OugG3yTeWBD4ZDc_peSw",
  "name": "notion-search",
  "input": {
    "__tool_use_purpose": "Search the user's Notion workspace to find all available documents",
    "query": "*",
    "query_type": "internal"
  }
}
Based on the search results, here are the Notion documents you have:

**Task Management:**
- Weekly To-do List
- My tasks

**Getting Started:**
- Welcome to Notion! (onboarding page)

**Other:**
- Home views

You have a mix of creative content, financial tracking documents, and productivity tools. Most were created about a month ago, with the Steam Deck poem being more recent (11 days ago).%

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@dingfeli dingfeli force-pushed the dingfeli/adds-http-support-agent-crate branch 6 times, most recently from b904dbb to ff7b381 Compare November 4, 2025 22:42
@dingfeli dingfeli force-pushed the dingfeli/adds-http-support-agent-crate branch from ff7b381 to 48336bf Compare November 4, 2025 22:46
@dingfeli dingfeli marked this pull request as ready for review November 4, 2025 23:00
@dingfeli dingfeli changed the title adds remote mcp support in agent crate feat(agent crate): adds remote mcp support in agent crate Nov 4, 2025
@dingfeli dingfeli force-pushed the dingfeli/adds-http-support-agent-crate branch from 48336bf to 8d60496 Compare November 4, 2025 23:20
@dingfeli dingfeli force-pushed the dingfeli/adds-http-support-agent-crate branch from 8d60496 to 960a9e6 Compare November 4, 2025 23:56
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.

2 participants