From 71a3dcc4ee3cb3f999b20d35fdd4edea1a231049 Mon Sep 17 00:00:00 2001 From: Jarian Cottingham Date: Tue, 3 Feb 2026 21:50:21 +0000 Subject: [PATCH] Add MCP capabilities endpoint to make API MCP compliant --- app.py | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/app.py b/app.py index 2c8fc6c..9e96a34 100755 --- a/app.py +++ b/app.py @@ -164,6 +164,49 @@ def get_version(): """Get API version""" return jsonify({'version': '1.0.0'}) +@app.route('/capabilities', methods=['GET']) +def get_capabilities(): + """MCP capabilities endpoint""" + return jsonify({ + "name": "YouTube CLI API", + "version": "1.0.0", + "description": "YouTube CLI API for searching and downloading videos", + "endpoints": [ + { + "path": "/search", + "method": "GET", + "description": "Search YouTube videos" + }, + { + "path": "/download", + "method": "POST", + "description": "Download a video by URL" + }, + { + "path": "/health", + "method": "GET", + "description": "Health check endpoint" + }, + { + "path": "/version", + "method": "GET", + "description": "Get API version" + }, + { + "path": "/capabilities", + "method": "GET", + "description": "MCP capabilities endpoint" + } + ], + "features": [ + "Video search", + "Video download", + "Health monitoring", + "Version information", + "MCP compliance" + ] + }) + if __name__ == '__main__': # Fix the port issue by using a different port app.run(host='0.0.0.0', port=4096, debug=True)