Skip to main content
Glama

OpenAPI to Model Context Protocol (MCP)

{ "permissions": { "allow": [ "Bash(rm:*)", "Bash(OPENAPI_URL=\"https://petstore3.swagger.io/api/v3/openapi.json\" SERVER_NAME=\"petstore3\" python src/server.py --help)", "Bash(OPENAPI_URL=\"https://petstore3.swagger.io/api/v3/openapi.json\" SERVER_NAME=\"petstore3\" python3 src/server.py)", "Bash(pip install:*)", "Bash(python3:*)", "Bash(source:*)", "Bash(OPENAPI_URL=\"https://petstore3.swagger.io/api/v3/openapi.json\" SERVER_NAME=\"petstore3\" python src/server.py)", "Bash(OPENAPI_URL=\"https://petstore3.swagger.io/api/v3/openapi.json\" SERVER_NAME=\"petstore3\" python server.py)", "Bash(python test:*)", "Bash(OPENAPI_URL=\"https://petstore3.swagger.io/api/v3/openapi.json\" SERVER_NAME=\"petstore3\" python -c \"\nimport server\nimport logging\nlogging.basicConfig(level=logging.ERROR)\ntry:\n config = server.ServerConfig()\n srv = server.MCPServer(config)\n srv.initialize()\n srv.register_openapi_tools()\n \n # Test parameter parsing with kwargs string\n tool_func = srv.registered_tools[''petstore3_findPetsByStatus''][''function'']\n \n # Test with JSON string\n result1 = tool_func(req_id=''test1'', kwargs=''{\"\"status\"\": \"\"available\"\"}'', dry_run=True)\n print(''JSON parsing test:'', ''SUCCESS'' if result1[''result''][''dry_run''] else ''FAILED'')\n \n # Test with comma-separated format\n result2 = tool_func(req_id=''test2'', kwargs=''status=pending'', dry_run=True)\n print(''Comma-separated parsing test:'', ''SUCCESS'' if result2[''result''][''dry_run''] else ''FAILED'')\n \n print(''Parameter parsing tests completed successfully!'')\n \nexcept Exception as e:\n print(f''Error: {e}'')\n import traceback\n traceback.print_exc()\n\")", "Bash(OPENAPI_URL=\"https://api.met.no/weatherapi/locationforecast/2.0/swagger\" SERVER_NAME=\"weather\" python -c \"\nimport server\nimport logging\nlogging.basicConfig(level=logging.INFO)\ntry:\n config = server.ServerConfig()\n srv = server.MCPServer(config)\n srv.initialize()\n \n # Register tools\n api_tools = srv.register_openapi_tools()\n srv.register_standard_tools()\n resources = srv.register_resources()\n prompts = srv.generate_prompts()\n \n print(f''Norwegian Weather API - Locationforecast'')\n print(f''API tools registered: {api_tools}'')\n print(f''Total tools: {len(srv.registered_tools)}'')\n print(f''Resources registered: {resources}'')\n print(f''Prompts generated: {prompts}'')\n \n # Show main forecast tools\n forecast_tools = [name for name in srv.registered_tools.keys() if ''compact'' in name.lower() or ''complete'' in name.lower()]\n print(f''Main forecast tools: {forecast_tools}'')\n \n # Test the compact forecast tool with coordinates\n if forecast_tools:\n tool_name = [t for t in forecast_tools if ''compact'' in t][0]\n tool_func = srv.registered_tools[tool_name][''function'']\n \n # Test dry run for Oslo coordinates\n dry_run = tool_func(req_id=''test'', lat=59.9139, lon=10.7522, dry_run=True)\n print(f''Oslo weather forecast dry run:'')\n print(f'' URL: {dry_run[\"\"result\"\"][\"\"request\"\"][\"\"url\"\"]}'')\n print(f'' Params: {dry_run[\"\"result\"\"][\"\"request\"\"][\"\"params\"\"]}'')\n \nexcept Exception as e:\n print(f''Error: {e}'')\n import traceback\n traceback.print_exc()\n\")", "WebFetch(domain:mcp-framework.com)", "WebFetch(domain:modelcontextprotocol.io)", "WebFetch(domain:github.com)", "WebFetch(domain:www.ragie.ai)", "Bash(timeout:*)", "Bash(chmod:*)", "Bash(pip index:*)", "Bash(pip show:*)" ], "deny": [] } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gujord/OpenAPI-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server