Swift server for OpenAI and compatible provider APIs: chat completions, DALL-E images, embeddings and model listing.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add swiftopenai --env API_KEY='<API_KEY>' -- npx -y swiftopenai-mcp~/.codex/config.toml
[mcp_servers.swiftopenai]
command = "npx"
args = ["-y", "swiftopenai-mcp"]
env = { API_KEY = "<API_KEY>" }
# codex mcp add swiftopenai --env API_KEY='<API_KEY>' -- npx -y swiftopenai-mcp~/.cursor/mcp.json
{
"mcpServers": {
"swiftopenai": {
"command": "npx",
"args": [
"-y",
"swiftopenai-mcp"
],
"env": {
"API_KEY": "<API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"swiftopenai": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"swiftopenai-mcp"
],
"env": {
"API_KEY": "<API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"swiftopenai": {
"command": "npx",
"args": [
"-y",
"swiftopenai-mcp"
],
"env": {
"API_KEY": "<API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"swiftopenai": {
"command": "npx",
"args": [
"-y",
"swiftopenai-mcp"
],
"env": {
"API_KEY": "<API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"swiftopenai": {
"command": "npx",
"args": [
"-y",
"swiftopenai-mcp"
],
"env": {
"API_KEY": "<API_KEY>"
}
}
}
}Environment variables
API_KEY
Replace the placeholders with your own credentials and keep them out of version control.