> ## Documentation Index
> Fetch the complete documentation index at: https://docs.geekai.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Remote MCP

The GeekAI Responses API lets OpenAI models use remote MCP servers through the built-in `mcp` tool.

> The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide tools and context to LLMs. The Responses API's MCP tool gives models access to tools hosted on remote MCP servers. Developers and organizations maintain these servers and expose their tools to MCP clients such as the Responses API.

To call a remote MCP server, send a request like this:

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/responses' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "gpt-5-mini",
  "tools": [
    {
      "type": "mcp",
      "server_label": "deepwiki",
      "server_url": "https://mcp.deepwiki.com/mcp",
      "require_approval": "never"
    }
  ],
  "input": "Which transport protocols does the March 26, 2025 MCP specification support?"
}'
```

```bash python theme={null}
# Install the OpenAI SDK first: `pip3 install openai`
from openai import OpenAI
client = OpenAI(api_key="$GEEKAI_API_KEY", base_url="https://geekai.co/api/v1")
response = client.responses.create(
    model="gpt-5-mini",
    input="Which transport protocols does the March 26, 2025 MCP specification support?",
    tools=[
        {
            "type": "mcp",
            "server_label": "deepwiki",
            "server_url": "https://mcp.deepwiki.com/mcp",
            "require_approval": "never"
        }
    ]
)
print(response)
```

```bash javascript theme={null}
// Install the OpenAI SDK first: `npm install openai`
import OpenAI from "openai";
const openai = new OpenAI({
    baseURL: 'https://geekai.co/api/v1',
    apiKey: '$GEEKAI_API_KEY'
});
async function main() {
    const response = await openai.responses.create({
        model: "gpt-5-mini",
        input: "Which transport protocols does the March 26, 2025 MCP specification support?",
        tools: [
            {
                    type: "mcp",
                    server_label: "deepwiki",
                    server_url: "https://mcp.deepwiki.com/mcp",
                    require_approval: "never"
            }
        ]
    });
    console.log(response);
}
main();
```

```bash go theme={null}
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
)

func main() {
	requestBody := map[string]any{
		"model": "gpt-5-mini",
		"input": "Which transport protocols does the March 26, 2025 MCP specification support?",
		"tools": []any{
			map[string]any{
				"type":               "mcp",
				"server_label":       "deepwiki",
				"server_url":         "https://mcp.deepwiki.com/mcp",
				"require_approval":   "never",
			},
		},
	}

	jsonData, err := json.Marshal(requestBody)
	if err != nil {
		panic(err)
	}

	client := &http.Client{}
	req, err := http.NewRequest("POST", "https://geekai.co/api/v1/responses", bytes.NewBuffer(jsonData))
	if err != nil {
		panic(err)
	}

	req.Header.Set("Authorization", "Bearer $GEEKAI_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	body, err := io.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}

	fmt.Println(string(body))
}
```

The MCP tool is available only in the Responses API and works with all [supported Responses API models](https://docs.geekai.co/en/docs/response/create.md). You pay only for tokens used to import tool definitions or make tool calls; there is no additional fee.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.