protocols
Get a cross-protocol breakdown comparing x402, MPP, and L402/Lightning to understand their differences.
Instructions
Get cross-protocol breakdown: x402 vs MPP vs L402/Lightning
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:21-21 (registration)Registration of the 'protocols' tool with description and empty input schema in the ListToolsRequestSchema handler.
{ name: 'protocols', description: 'Get cross-protocol breakdown: x402 vs MPP vs L402/Lightning', inputSchema: { type: 'object', properties: {} } }, - server.js:34-43 (handler)Handler for the 'protocols' tool - maps to the '/protocols' free endpoint, fetches data from the API and returns it as JSON.
server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; const freeEndpoints = { stats: '/stats', quality: '/quality', protocols: '/protocols', prices: '/prices', trends: '/trends' }; if (freeEndpoints[name]) { const resp = await fetch(BASE_URL + freeEndpoints[name]); const data = await resp.json(); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; } - server.js:37-37 (helper)Definition of freeEndpoints map that includes the 'protocols' endpoint mapped to '/protocols' path.
const freeEndpoints = { stats: '/stats', quality: '/quality', protocols: '/protocols', prices: '/prices', trends: '/trends' };