Merge pull request #133 from koic/add_connect_to_stdio_client

Add client-level connect handshake to stdio transport
This commit is contained in:
Alex Akimov 2026-05-06 23:02:16 +02:00 • committed by GitHub
commit 7ce3b10829
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -5,4 +5,4 @@ source "https://rubygems.org"
gem "anthropic"
gem "base64"
gem "dotenv"
gem "mcp", '>= 0.9.1'
gem "mcp", '>= 0.15.0'

View file

@ -28,6 +28,7 @@ class MCPClient
@transport = MCP::Client::Stdio.new(command: command, args: [server_script_path])
@mcp_client = MCP::Client.new(transport: @transport)
@mcp_client.connect
tool_names = @mcp_client.tools.map(&:name)
puts "\nConnected to server with tools: #{tool_names}"