The Practical Launchpad Assisting with MCP Abstraction.
Plasma is a Ruby-based SDK that provides a Rails-inspired, convention-over-configuration approach to building Model Context Protocol servers. Like a plasma engine powering a spacecraft, Plasma provides the fundamental infrastructure to power your MCP services with minimal resistance.
π Getting Started β’ π Usage Guide β’ βοΈ Development
β οΈ Warning: Plasma is currently in pre-alpha development (0.0.1-pre). Until version 0.1.0 is released, all versions (including patch updates) may contain breaking changes. This allows us to rapidly iterate and improve the API based on early feedback. See our roadmap for more details.
- β Rails-inspired project and component generation (tools, prompts, and resources)
- β Storage system for persistent data (variables and records)
- π§ Local authentication system via Omniauth (coming soon - partially implemented)
- Ruby
3.4
or higher (tested on3.4.2+
) - Bundler
- Docker (optional, for containerized deployment)
Install Plasma:
gem install plasma-mcp
- Create a new project:
plasma new my_server
cd my_server
- Generate your first tool:
plasma g tool greeting name:string
- Start your plasma server (in STDIN/STDOUT mode)
plasma server
- Pass it some JSON to try it out:
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"greeting","arguments":{"name":"Jean-Luc Picard"}}}
You will get the output:
{"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"Hello from GreetingTool with params: Jean-Luc Picard "}],"isError":false}}
Congratulations. We have liftoff! π
my_server/
βββ app/
β βββ prompts/ # MCP prompts
β βββ resources/ # MCP resources
β βββ tools/ # MCP tools
β βββ variables/ # Per-sesion variables (e.g. `current_user_email_variable`)
β βββ records/ # Stored objects (e.g. `task_records`)
βββ config/
β βββ initializers/ # Preload configuration
β βββ application.rb # MCP server configuration
β βββ boot.rb # Launch ignition sequence
βββ .env # Environment variables
Generate a new tool using the CLI:
plasma g tool greeting name:string
This will generate a tool file in app/tools/greeting_tool.rb
that follows this structure:
# app/tools/greeting_tool.rb
module MyServer
module Tools
# A friendly space station greeting system
class GreetingTool < Plasma::Tool
param :name,
type: :string,
description: "Name of the space traveler to welcome"
def call
respond_with(:text,
text: <<~GREETING
Welcome aboard, #{params[:name]}!
Your presence has been registered in our stellar database. π
GREETING
)
end
end
end
end
The tool's description is automatically extracted from the comment above the class. Parameters are defined using the param
class method, which supports:
type
: The parameter type (:string
,:number
,:float
,:boolean
, or:array
)description
: A description of the parameterrequired
: Whether the parameter is required (defaults to false)
Parameters are accessed in the call
method via the params
hash.
The respond_with
method supports several response types: :text
, :image
, :resource
and :error
Configure your application in config/application.rb
:
module MyServer
class Application < Plasma::Application
self.initialize! do |config|
config.name = "My Custom Server Name"
end
end
- Set up your environment variables
- Run the server:
plasma server
Docker deployment support is currently under development. This feature will provide:
- Pre-built Docker images for easy deployment
- Containerized environment for consistent execution
- Integration with popular container orchestration platforms
Stay tuned for updates in our upcoming releases!
Server-Sent Events (SSE) deployment is planned for version 0.2.0. This feature will include:
- Real-time event streaming capabilities
- WebSocket support for bidirectional communication
- Enhanced monitoring and debugging tools
- Improved error handling and recovery mechanisms
Stay tuned for updates in our upcoming releases!
After git cloning, run bin/setup
to install dependencies. Then, run rake test
to run the diagnostics. You can also run bin/console
for a low level command terminal.
To start an interactive console for your project (similar to rails console
):
plasma console
This will give you access to your project's environment where you can interact with your components, storage variables, and other features:
# Example console session
> MyTool.new.call
=> "Tool execution result"
For detailed information about our development status, versioning strategy, and roadmap, please see ROADMAP.md.
Join our Discord community to connect with other developers, get help, and stay updated on the latest developments:
Improvements and bug reports are welcome on GitHub at https://github.com/plasma-mcp/plasma
This project is available as open source under the terms of the MIT License.