OpenAI API MCP Server
Connect to OpenAI API
Connect OpenAI's Responses API to your viaSocket MCP server
Get an OpenAI API Key
First, make sure that you have a valid OpenAI API key.
To view or generate a new OpenAI API Key, go to the OpenAI platform API Keys page
Export your API key as an environment variable:
export OPENAI_API_KEY="sk-..."MCP server information
Caution: Treat your API key like a password! It can be used to run tools attached to this server and access your data.
The URL for this MCP server copy from the panel.
Using OpenAI's Responses API
OpenAI's Responses API can be used to call viaSocket MCP from anywhere.
Code Example
cURL
curl --location 'https://api.openai.com/v1/responses' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $OPENAI_API_KEY" \
--data '{
"model": "gpt-4.1",
"tools": [
{
"type": "mcp",
"server_label": "viasocket",
"server_url": "https://mcp.viasocket.com/mcp/688**********************",
"require_approval": "never"
}
],
"input": "List all of my available tools",
"tool_choice": "required"
}'Was this helpful?