OpenAI SDK compatible LLM access
## Chat Completions MCP Server: Universal Chat API The **Chat Completions MCP Server** provides a standardized chat interface for Google Antigravity. This integration offers a consistent API for conversational AI interactions across different model providers with streaming, tool calling, and multi-turn conversations. ### Why Chat Completions MCP? Standardized chat brings consistency: - **Universal Format**: Same interface for all models - **Streaming**: Real-time response streaming - **Multi-Turn**: Maintain conversation context - **Tool Calling**: Function execution support - **Message History**: Persistent conversations ### Key Features #### 1. Standard Chat Interface ```python from chat_completions import ChatClient client = ChatClient() response = client.chat( messages=[ {"role": "system", "content": "You are a helpful coding assistant."}, {"role": "user", "content": "How do I create a REST API in Python?"} ], model="gpt-4-turbo", temperature=0.7 ) print(response.content) ``` #### 2. Streaming Responses ```python # Stream for real-time display stream = client.chat( messages=[{"role": "user", "content": prompt}], model="claude-3-opus", stream=True ) for chunk in stream: print(chunk.content, end="", flush=True) ``` #### 3. Conversation History ```python conversation = client.create_conversation() # Multi-turn chat with memory conversation.add_message("user", "What is Python?") response1 = conversation.complete() conversation.add_message("user", "How is it different from JavaScript?") response2 = conversation.complete() # Remembers context ``` ### Configuration ```json { "mcpServers": { "chat-completions": { "command": "npx", "args": ["-y", "@anthropic/mcp-chat"], "env": { "DEFAULT_MODEL": "gpt-4-turbo", "OPENAI_API_KEY": "your-key" } } } } ``` ### Use Cases **Chatbots**: Build conversational interfaces with consistent API. **Code Assistants**: Create coding helpers with multi-turn context. **Customer Support**: Implement AI support with conversation memory. The Chat Completions MCP Server standardizes chat AI for Antigravity.
{
"mcpServers": {
"chat-completions": {
"mcpServers": {
"any-chat": {
"env": {
"LLM_API_KEY": "YOUR_API_KEY",
"LLM_BASE_URL": "https://api.openai.com/v1"
},
"args": [
"-y",
"any-chat-completions-mcp"
],
"command": "npx"
}
}
}
}
}