Skip to main content
Glama

OpenAPI to Model Context Protocol (MCP)

# Use an official Python runtime as a parent image FROM python:3.12-slim # Set the working directory in the container WORKDIR /app # Copy requirements first for better caching COPY requirements.txt . # Install any needed packages specified in requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Copy the current directory contents into the container at /app COPY . /app # Create a non-root user for security RUN groupadd -r appuser && useradd -r -g appuser appuser RUN chown -R appuser:appuser /app USER appuser # Make ports available to the world outside this container EXPOSE 8001 8002 # Define environment variables ENV PYTHONUNBUFFERED=1 ENV PYTHONPATH=/app/src # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD python -c "import httpx; httpx.get('http://localhost:${MCP_HTTP_PORT:-8001}/health', timeout=5)" || exit 1 # Run FastMCP server when the container launches CMD ["python", "src/fastmcp_server.py"]

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