I tried to create my own MCP server by subclassing MCP but the initialization process only looks at the server class itself
MCPMessageProcessor >> addHandlersFromPragmasIn: anObject
( Pragma allNamed: #jrpc: in: anObject class )
do: [ :pragma | ...
since the pragma is in methods define by MCP itself, this does not work for subclasses of MCP
One straightforward solution would be to redefine it to look up the inheritance hierarchy:
addHandlersFromPragmasIn: anObject
anObject class withAllSuperclasses reverseDo: [ :cls |
(Pragma allNamed: #jrpc: in: aClass) do: [ :pragma | ...
I tried to create my own MCP server by subclassing MCP but the initialization process only looks at the server class itself
since the pragma is in methods define by MCP itself, this does not work for subclasses of MCP
One straightforward solution would be to redefine it to look up the inheritance hierarchy: