class

Smith::MCP::Manager

Inherits Reference < Object

Every configured server, and the naming rules that keep their tools apart.

Constants

MAX_TOOL_NAME = 64

Anthropic and OpenAI both cap tool names at 64 characters and accept only this alphabet, so a server called "my server!" has to be folded into it before it ever reaches a request.

Constructors

build(specs : Array(ServerSpec), timeout : Time::Span = Client::DEFAULT_TIMEOUT, startup_timeout : Time::Span = Client::STARTUP_TIMEOUT) : Manager
Source
new(handles : Array(ServerHandle) = Array(ServerHandle).new)
Source

Class methods

sanitize(value : String) : String
Source
tool_name(server : String, tool : String) : String

The registered name for one tool. The mcp__ prefix is what keeps these clear of the built-in tools and makes mcp__filesystem__* addressable in a permission rule.

Source
unique(name : String, taken : Set(String)) : String
Source

Instance methods

[](name : String) : ServerHandle | Nil
Source
empty?
Source
handles
Source
running
Source
shutdown
Source
start_all(warn_io : IO = STDERR) : Nil

Starts everything, reporting failures rather than raising them.

Source
summary

"filesystem (12 tools)" per running server, for the banner and mcp list.

Source