We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/drewtech/mcp-ai-poc'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
ai_tools.py•603 B
"""
AI tools and utilities for the MCP server.
"""
import os
from openai import OpenAI
class OpenAIClient:
"""Manages OpenAI API client with singleton-like behavior."""
def __init__(self):
self._client = None
def get_client(self):
"""Get or create OpenAI client with API key from environment."""
if self._client is None:
api_key = os.getenv("OPENAI_API_KEY")
if not api_key:
raise ValueError("OPENAI_API_KEY environment variable must be set")
self._client = OpenAI(api_key=api_key)
return self._client