diff --git a/app.py b/app.py index 9e96a34..badaa3a 100755 --- a/app.py +++ b/app.py @@ -196,6 +196,11 @@ def get_capabilities(): "path": "/capabilities", "method": "GET", "description": "MCP capabilities endpoint" + }, + { + "path": "/openapi.json", + "method": "GET", + "description": "OpenAPI specification" } ], "features": [ @@ -207,6 +212,18 @@ def get_capabilities(): ] }) +@app.route('/openapi.json', methods=['GET']) +def get_openapi(): + """Serve the OpenAPI specification file""" + try: + # Read the openapi.json file from the filesystem + with open('openapi.json', 'r') as f: + import json + spec = json.load(f) + return jsonify(spec) + except Exception as e: + return jsonify({"error": "OpenAPI specification not found"}), 404 + if __name__ == '__main__': # Fix the port issue by using a different port app.run(host='0.0.0.0', port=4096, debug=True)