Commit graph ruby-sdk/examples/stdio_server.rb
Author SHA1 Message Date
Koichi ITO
bee6eace22 Remove unnecessary transport requires
The transports are already required by `require 'mcp'`:
https://github.com/modelcontextprotocol/ruby-sdk/blob/v0.3.0/lib/mcp.rb#L16-L17
2025-10-07 14:10:48 +09:00
jdnvn
8b4085468e add titles to tools, prompts and resources 2025-08-17 22:58:15 -04:00
Koichi ITO
4ba1e2b7f4
Merge pull request #95 from andyw8/andyw8/fix-resource-example
Fix stdio server resource example
2025-07-30 12:45:19 +09:00
Andy Waite
8b92ce005f Use valid syntax for URI examples 2025-07-27 11:29:03 -04:00
Andy Waite
d7a1e742a1 Fix stdio server resource example 2025-07-26 19:38:02 -04:00
Koichi ITO
100d1a1ab3 Remove shebang from example files
Since the example files are not executable binaries, this PR removes the shebangs.

This ensures that all examples are consistently executed via `ruby` command.
It also removes the executable permission from `examples/stdio_server.rb` using `chmod 444`,
bringing it in line with the other example files.
2025-06-19 16:00:38 +09:00
Koichi ITO
70680fce88 Fix build error
Follow-up to #27.

This PR fixes the following build error:

```console
$ bundle exec rake
/Users/koic/.rbenv/versions/3.5-dev/lib/ruby/3.5.0+1/bundled_gems.rb:59:in 'Kernel.require': cannot load such file -- mcp/transports/stdio (LoadError)
Did you mean?  mcp/transports/stdio_transport_test
        from /Users/koic/.rbenv/versions/3.5-dev/lib/ruby/3.5.0+1/bundled_gems.rb:59:in 'block (2 levels) in Kernel#replace_require'
        from /Users/koic/src/github.com/modelcontextprotocol/ruby-sdk/test/mcp/transports/stdio_transport_test.rb:4:in '<top (required)>'
        from /Users/koic/.rbenv/versions/3.5-dev/lib/ruby/3.5.0+1/bundled_gems.rb:59:in 'Kernel.require'
        from /Users/koic/.rbenv/versions/3.5-dev/lib/ruby/3.5.0+1/bundled_gems.rb:59:in 'block (2 levels) in Kernel#replace_require'
        from /Users/koic/.rbenv/versions/3.5-dev/lib/ruby/gems/3.5.0+1/gems/rake-13.3.0/lib/rake/rake_test_loader.rb:21:in 'block in <main>'
        from /Users/koic/.rbenv/versions/3.5-dev/lib/ruby/gems/3.5.0+1/gems/rake-13.3.0/lib/rake/rake_test_loader.rb:6:in 'Array#select'
        from /Users/koic/.rbenv/versions/3.5-dev/lib/ruby/gems/3.5.0+1/gems/rake-13.3.0/lib/rake/rake_test_loader.rb:6:in '<main>'
rake aborted!
Command failed with status (1)
/Users/koic/.rbenv/versions/3.5-dev/bin/bundle:25:in 'Kernel#load'
/Users/koic/.rbenv/versions/3.5-dev/bin/bundle:25:in '<main>'
Tasks: TOP => default => test
(See full trace by running task with --trace)
```

https://github.com/modelcontextprotocol/ruby-sdk/actions/runs/15428236624/job/43420346011

The following is stated in #27.

> Breaking Changes
> `MCP::Transports::StdioTransport` is now `MCP::Server::Transports::StdioTransport`

What is shown here is the new name `MCP::Server::Transports::StdioTransport`, not `MCP::Server::Transports::Stdio`.

Therefore, the file path has been updated from `lib/mcp/server/transports/stdio.rb` to `lib/mcp/server/transports/stdio_transport.rb` to
match the module name. If `MCP::Server::Transports::Stdio` is preferred instead, please let me know and I will open a separate PR.
2025-06-04 11:48:25 +09:00
Joey Cardosi
d80b13736e
just redo all of it from scratch 2025-05-30 12:15:11 -04:00
Topher Bullock
9d2447b351 rename lib/{model_context_protocol => mcp} 2025-05-29 17:11:40 -04:00
Kevin Fischer
7b390053bd
Update README and example with server version 2025-05-13 23:58:38 +09:00
Tyler Rowsell
baeb99ffbc Internal Release 0.7.0
- add support for resource templates
- improve capability negotiation on handlers
- clean up readme
- reduce default protocol version to "2024-11-05"
- address spec compliance of resources
- add debug gem to development
- alias ModelContextProtocol to MCP
- move prompt subclasses to subdir
- improve tool and prompt definition
- improve passing of server context to tools
- improve tool input schema validation
2025-05-08 17:38:19 -04:00
Tyler Rowsell
62184957e0 Internal Release 0.6.0
Rename Context Arg
2025-05-08 17:38:13 -04:00
Topher Bullock
6da8bfab1a Internal Release 0.5.2
Added
- Added stdio transport functionality.
Changed
- Added stdio details to the README.
2025-05-08 17:38:09 -04:00