Redop is the main class for building MCP servers. Use the constructor for server metadata and top-level behavior, then register tools, resources, prompts, hooks, middleware, and plugins.
Constructor
Constructor options
serverInfo fields
Icon shape
icons accepts an array of objects with this shape:
srcis required and should usually be anhttps:URL ordata:URI.mimeTypeis optional, but common values areimage/png,image/jpeg,image/jpg,image/svg+xml, andimage/webp.sizessupports values like["48x48"],["48x48", "96x96"], or["any"]for scalable icons.themecan be"light"or"dark".- Clients should treat icon URLs and bytes as untrusted input and apply normal fetch/render safety checks.
Deprecated top-level fields
Redop still accepts top-levelname, title, version, description, icons, websiteUrl, and instructions, but they are deprecated. Put new docs and new app code under serverInfo.
Main methods
Introspection
toolNamesreturns registered tool namesresourceUrisreturns registered resource URIspromptNamesreturns registered prompt namesgetTool(name)returns the resolved tool metadatagetResource(uri)returns the resolved resource metadatagetPrompt(name)returns the resolved prompt metadataserverInforeturns the MCP server identity used during initialize
Composition pattern
Use.use(...) as the main way to compose a larger server.
In practice, that usually means:
- create one
Redopinstance per feature folder - register that feature’s tools, resources, prompts, hooks, or middleware there
- import those modules into the root server
- attach them with
.use(...)