This project exposes an OSGi error interpreter two ways:
- A
POST /errorInterpreterHTTP endpoint used by the HTML front-end. - A
POST /mcpModel Context Protocol endpoint that lets LLMs (such as Claude) call the interpreter as a tool when they encounter an OSGi error.
The /mcp route is a stateless MCP server that speaks the Streamable HTTP transport using single JSON responses (it does not open server-initiated SSE streams). It exposes one tool:
interpret_osgi_error– input{ "errorMessage": string }; returns a plain-text interpretation plus generic and Elastic Path Self-Managed Commerce remediation guidance.
For Claude Code:
claude mcp add --transport http osgi-error-interpreter <api-base-url>/mcpOther clients accept the same URL as a remote/HTTP MCP server. No local installation is required.
The samples/mcp-*.json files contain ready-to-use JSON-RPC requests in API Gateway proxy format:
sls invoke local --function mcp --path samples/mcp-initialize.json --verbose
sls invoke local --function mcp --path samples/mcp-tools-list.json --verbose
sls invoke local --function mcp --path samples/mcp-tools-call.json --verbosemvn clean installTo run the Lambda locally without deploying to AWS, use these steps:
- Install the Serverless Framework’s Open Source CLI.
- Invoke the Lambda functions locally as follows:
sls invoke local --function errorInterpreter --path samples/sample1.json --verbose - To run the commands with remote debugging enabled, run the following before the
sls invoke localcommand:export JAVA_TOOL_OPTIONS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE"
- Install the AWS Command Line Interface.
- Run
aws configureand enter your AWS account details. - Deploy the Lambda using
sls deploy.