Module: ZeroMcp

Defined in:
lib/zeromcp.rb,
lib/zeromcp/tool.rb,
lib/zeromcp/config.rb,
lib/zeromcp/schema.rb,
lib/zeromcp/server.rb,
lib/zeromcp/sandbox.rb,
lib/zeromcp/scanner.rb

Defined Under Namespace

Modules: Sandbox, Schema, ToolDSL Classes: Config, Context, PromptLoader, PromptScanner, ResourceLoader, ResourceScanner, Scanner, Server, Tool, ToolLoader

Constant Summary collapse

MIME_MAP =

— Resource scanning —

{
  '.json' => 'application/json',
  '.txt'  => 'text/plain',
  '.md'   => 'text/markdown',
  '.html' => 'text/html',
  '.xml'  => 'application/xml',
  '.yaml' => 'text/yaml',
  '.yml'  => 'text/yaml',
  '.csv'  => 'text/csv',
  '.css'  => 'text/css',
  '.js'   => 'application/javascript',
  '.ts'   => 'text/typescript',
  '.sql'  => 'text/plain',
  '.sh'   => 'text/plain',
  '.py'   => 'text/plain',
  '.go'   => 'text/plain',
  '.rs'   => 'text/plain',
  '.toml' => 'text/plain',
  '.ini'  => 'text/plain',
  '.env'  => 'text/plain'
}.freeze

Class Method Summary collapse

Class Method Details

.serve(config_path = nil) ⇒ Object



6
7
8
9
10
# File 'lib/zeromcp.rb', line 6

def self.serve(config_path = nil)
  config = config_path ? Config.load(config_path) : Config.load
  server = Server.new(config)
  server.serve
end