Add MCP Schema Endpoint for API Discovery

- Implemented `/mcp` endpoint to expose server capabilities
- Created `src/mcp/schema.ts` with comprehensive tool and resource definitions
- Updated README.md with MCP Schema documentation
- Modified security middleware to allow unauthenticated access to schema endpoint
- Included detailed tool descriptions for list_devices, control, and event subscription
This commit is contained in:
jango-blockchained
2025-02-01 06:42:16 +01:00
parent aa911c179d
commit 155a6ea5ba
4 changed files with 171 additions and 2 deletions

View File

@@ -127,8 +127,8 @@ export class TokenManager {
// Request validation middleware
export function validateRequest(req: Request, res: Response, next: NextFunction) {
// Skip validation for health endpoint
if (req.path === '/health') {
// Skip validation for health and MCP schema endpoints
if (req.path === '/health' || req.path === '/mcp') {
return next();
}