{"id":26322797,"url":"https://github.com/funwarioisii/mcp-rb","last_synced_at":"2025-03-15T17:04:47.967Z","repository":{"id":277174059,"uuid":"931608450","full_name":"funwarioisii/mcp-rb","owner":"funwarioisii","description":"A lightweight Ruby framework for building MCP servers with a Sinatra-like DSL","archived":false,"fork":false,"pushed_at":"2025-03-12T04:03:12.000Z","size":119,"stargazers_count":31,"open_issues_count":4,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T05:18:41.242Z","etag":null,"topics":["mcp-server","modelcontextprotocol"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/mcp-rb","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/funwarioisii.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-12T15:07:13.000Z","updated_at":"2025-03-12T04:03:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"3fa10265-8ad4-4938-8136-6232f9a8a741","html_url":"https://github.com/funwarioisii/mcp-rb","commit_stats":null,"previous_names":["funwarioisii/mcp-rb"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funwarioisii%2Fmcp-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funwarioisii%2Fmcp-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funwarioisii%2Fmcp-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funwarioisii%2Fmcp-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/funwarioisii","download_url":"https://codeload.github.com/funwarioisii/mcp-rb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243762266,"owners_count":20343979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mcp-server","modelcontextprotocol"],"created_at":"2025-03-15T17:04:46.861Z","updated_at":"2025-03-15T17:04:47.955Z","avatar_url":"https://github.com/funwarioisii.png","language":"Ruby","funding_links":[],"categories":["Ruby","📚 Projects (1974 total)","🌐 Web Development"],"sub_categories":["MCP Servers"],"readme":"# MCP-RB\n\nA lightweight Ruby framework for implementing MCP (Model Context Protocol) servers with a Sinatra-like DSL.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'mcp-rb'\n```\n\n## Usage\n\nHere's a simple example of how to create an MCP server:\n\n```ruby\nrequire 'mcp'\n\nname \"hello-world\"\n\nversion \"1.0.0\"\n\n# Define a resource\nresource \"hello://world\" do\n  name \"Hello World\"\n  description \"A simple hello world message\"\n  call { \"Hello, World!\" }\nend\n\n# Define a resource template\nresource_template \"hello://{user_name}\" do\n  name \"Hello User\"\n  description \"A simple hello user message\"\n  call { |args| \"Hello, #{args[:user_name]}!\" }\nend\n\n# Define a tool\ntool \"greet\" do\n  description \"Greet someone by name\"\n  argument :name, String, required: true, description: \"Name to greet\"\n  call do |args|\n    \"Hello, #{args[:name]}!\"\n  end\nend\n\n# Define a tool with nested arguments\ntool \"greet_full_name\" do\n  description \"Greet someone by their full name\"\n  argument :person, required: true, description: \"Person to greet\" do\n    argument :first_name, String, required: false, description: \"First name\"\n    argument :last_name, String, required: false, description: \"Last name\"\n  end\n  call do |args|\n    \"Hello, First: #{args[:person][:first_name]} Last: #{args[:person][:last_name]}!\"\n  end\nend\n\n# Define a tool with an Array argument\ntool \"group_greeting\" do\n  description \"Greet multiple people at once\"\n  argument :people, Array, required: true, items: String, description: \"People to greet\"\n  call do |args|\n    args[:people].map { |person| \"Hello, #{person}!\" }.join(\", \")\n  end\nend\n```\n\n## Supported specifications\n\nReference: [MCP 2024-11-05](https://spec.modelcontextprotocol.io/specification/2024-11-05/)\n\n- [Base Protocol](https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/)\n  - ping\n  - stdio transport\n- [Server features](https://spec.modelcontextprotocol.io/specification/2024-11-05/server/)\n  - Resources\n    - resources/read\n    - resources/list\n    - resources/templates/list\n  - Tools\n    - tools/list\n    - tools/call\n\nAny capabilities are not supported yet.\n\n## Testing\n\n```bash\nruby -Ilib:test -e \"Dir.glob('./test/**/*_test.rb').each { |f| require f }\"\n```\n\nTest with MCP Inspector\n\n```bash\nbunx @modelcontextprotocol/inspector $(pwd)/examples/hello_world.rb\n```\n\nFind broken using `hello_world.rb`\n\n```bash\n./test/test_requests.sh\n```\n\n## Formatting\n\n```bash\nbundle exec standardrb --fix\n```\n\n## Release\n\nTo release a new version:\n\n1. Update version in `lib/mcp/version.rb`\n2. Update `CHANGELOG.md`\n3. Create a git tag\n\n```bash\ngit add .\ngit commit -m \"Release vx.y.z\"\ngit tag vx.y.z\ngit push --tags\n```\n\n1. Build and push to RubyGems\n\n```bash\ngem build mcp-rb.gemspec\ngem push mcp-rb-*.gem\n```\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunwarioisii%2Fmcp-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunwarioisii%2Fmcp-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunwarioisii%2Fmcp-rb/lists"}