VectorMCP is an MCP server and Ruby gem that implements the Model Context Protocol server specification to expose application tools, resources, and prompt templates to LLM clients. Designed for Ruby and Ruby on Rails developers, it provides an infrastructure layer that translates AI interactions into backend code execution. It connects LLM interfaces, such as Claude Desktop or custom agents, to Ruby environments using streamable HTTP transport over Server-Sent Events (SSE). The framework supports both class-based tool definitions and block-based registrations, with native parameter typing, date coercion, and schema generation. VectorMCP can operate as a standalone server on an independent port or mount directly into existing Rack and Rails applications as a route endpoint. It includes request-scoped identity handling, opt-in API key or OAuth 2.1 authentication, customizable authorization policies, rate limiting, and field anonymization middleware that masks sensitive strings like emails and social security numbers prior to transmitting payloads to an LLM context.
Category: AI & LLM Tooling
Tags: development, framework, ruby, sdk
bash gem install vector_mcp Alternatively, add it to your Gemfile: ruby gem "vector_mcp" 3. Define your tools, prompts, or resources using VectorMCP::Tool or the server.register_tool DSL in your Ruby codebase. 4. Run the standalone server by calling server.run(port: 8080) or mount server.rack_app inside your Rails routing configuration (config/routes.rb): ruby mount MCP_APP => "/mcp" 5. Connect your MCP client (such as Claude Desktop or another streamable HTTP client) to the exposed HTTP endpoint (e.g., http://localhost:8080/mcp). For authentication details or OAuth setup, follow the project guide at https://github.com/sergiobayona/VectorMCP.Part of MCP Servers
VectorMCP requires Ruby 3.2 or newer. You can install it globally via the terminal command gem install vector_mcp, or include gem vector_mcp in your application Gemfile and run bundle install. From there, you require vector_mcp in your code to create and mount server instances.
VectorMCP enables developers to build custom MCP servers in Ruby. It allows you to expose callable tools, readable resources, and prompt templates to LLMs. It supports streamable HTTP transport with SSE, class-based parameter validation, Rack and Rails mounting, request-scoped authentication, and data anonymization middleware.
VectorMCP works with any client compliant with the Model Context Protocol streamable HTTP specification. Clients supporting HTTP POST and SSE streams, such as Claude Desktop or custom agents, can communicate directly with the server endpoint, complete handshakes, and invoke tools.
Yes, VectorMCP is open-source software distributed under the terms of the MIT License. The code repository is hosted on GitHub, where developers can inspect the source code, open issue reports, and submit pull requests.
Yes, VectorMCP is designed to integrate into Rails applications. You can convert the server instance into a Rack application using server.rack_app and mount it inside config/routes.rb. The gem also includes VectorMCP::Rails::Tool for handling ActiveRecord models and database queries.