This is a FastMCP server implementation for OpenOps that provides a managed control plane using FastMCP and OpenAPI specifications.
- Create a virtual environment:
python3 -m venv .venv
source .venv/bin/activate # On Windows use: .venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file with the following variables:
AUTH_TOKEN=your_auth_token
OPENAPI_SCHEMA=your_openapi_schema
API_BASE_URL=your_api_base_url
LOGZIO_TOKEN=your_logzio_token # Optional: for Logz.io logging
fastmcp
: FastMCP framework for building managed control planeshttpx
: Async HTTP client for making API requestspython-dotenv
: For environment variable managementlogzio-python-handler
: For Logz.io logging integration
python main.py
The server supports two types of logging:
-
Console Logging: All logs are output to the console with DEBUG level, providing detailed information during development and debugging.
-
Logz.io Logging: If
LOGZIO_TOKEN
is set in the environment, logs will also be sent to Logz.io with INFO level. This is useful for production monitoring and log aggregation.
To enable Logz.io logging:
- Get your Logz.io token from your Logz.io account
- Add it to your
.env
file asLOGZIO_TOKEN=your_token
AUTH_TOKEN
: Authentication token for API requestsOPENAPI_SCHEMA
: OpenAPI schema in JSON format that defines the API structureAPI_BASE_URL
: Base URL for the API endpointsLOGZIO_TOKEN
: (Optional) Logz.io token for remote loggingENVIRONMENT
: (Optional) Used for Logz.io