Skip to content

Conversation

@salman1993
Copy link
Contributor

@salman1993 salman1993 commented Dec 20, 2024

Provides a minimal MCP client sdk which will be used to write goose as an MCP client.
https://spec.modelcontextprotocol.io/specification/basic/

Methods we implemented:

  • initialize
  • list resources
  • read resource
  • list tools
  • call tool

salman1993 and others added 18 commits December 16, 2024 23:26
* origin/v1.0:
  stop bubbles filling screen (#495)
  chore: V1.0 release automation (#493)
  requires foreign architectures
  more xcompile deps
  x compilation tools
  chore: Cargo build tokenizers (#491)
  feat: build and release binaries to GH releases (#477)
  fix: width of bubbles and logging errors (#487)
  feat: add google provider (#489)
  feat: flappy goose easter egg (#479)
…ntation

* checks out the changes from 'kalvin/mcp-client-trait' branch

Co-authored-by: kalvinnchau <[email protected]>
Copy link
Collaborator

@baxen baxen left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@kalvinnchau kalvinnchau left a comment

Choose a reason for hiding this comment

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

LGTM!

some potential places for better ergonomics (type state, error handling) but can also be handled in another PR

Comment on lines +36 to +43
struct TransportServiceInner<T: Transport> {
transport: Arc<T>,
router: Mutex<Option<MessageRouter>>,
initialized: AtomicBool,
}

impl<T: Transport> TransportServiceInner<T> {
async fn ensure_initialized(&self) -> Result<MessageRouter, ServiceError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be worth exploring the use of the Type State Pattern here? We could get compile time guarantees about the state of the Transport and have no need for the ensure_initialized further down in TransportService::call's method. (Disclaimer: i only recently learned about this pattern https://cliffle.com/blog/rust-typestate/)

Copy link
Contributor

Choose a reason for hiding this comment

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

It would probably be possible to also use the Type State Pattern on the McpClient itself for more compile time guarantees

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this makes a lot of sense. i will defer this to another PR for now

@salman1993 salman1993 merged commit 64969ba into v1.0 Dec 20, 2024
3 checks passed
lifeizhou-ap added a commit that referenced this pull request Dec 20, 2024
* v1.0:
  feat: MCP client sdk (#505)
michaelneale added a commit that referenced this pull request Dec 21, 2024
* v1.0:
  conditionally load memory system in goose server (#508)
  Adds 'instructions' field to InitializeResult (#511)
  feat: MCP client sdk (#505)
michaelneale added a commit that referenced this pull request Jan 6, 2025
* v1.0: (43 commits)
  feat: openrouter provider (#538)
  [ui] chore: tidy up gui providers (#537)
  [ui]: Polish and system theme fix (#533)
  [ui]: General ui polish to more closely match designs (#532)
  Latency issue fix with prepare_inference (#535)
  chore: use cross to build binaries (#507)
  feat: a system for non developers to augment developer system (#524)
  fix: Broken open directory and new session buttons in more menu (#520)
  refactor: move get_usage to provider trait (#506)
  fix: Make stop button more obvious (#516)
  fix: Enhance Dark mode menu dots visibility (#517)
  working on automating release of .zip and binaries and having them on each PR as well (#509)
  conditionally load memory system in goose server (#508)
  Adds 'instructions' field to InitializeResult (#511)
  feat: MCP client sdk (#505)
  Update cli-release.yml
  feat: added groq provider (#494)
  fix: use rust tls (#500)
  fix: Ldelalande/fix scroll (#504)
  feat: MCP server sdk (simple version first) (#499)
  ...
@yingjiehe-xyz yingjiehe-xyz deleted the sm/mcp-client-tower-channels branch February 5, 2025 21:05
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.

4 participants