Skip to content

[FEATURE REQ] Add ResponseTool.CreateMcpTool to configure Remote MCP Servers for Response APIΒ #588

@gophph

Description

@gophph

Describe the feature or improvement you are requesting

OpenAI API describes MCP tool type to list Remote MCP when using Response API

In alignment with other tool types, can you please add ResponseTool.CreateMcpTool method.

Example of intended usage:

        var azureClient = new AzureOpenAIClient(
            new Uri("https://your-openai-endpoint.openai.azure.com/"),
            new AzureKeyCredential(Environment.GetEnvironmentVariable("AZURE_OPENAI_API_KEY")));
        
        var client = azureClient.GetOpenAIResponseClient("your-deployment-name");

        OpenAIResponse response = await client.CreateResponseAsync(
            userInputText: "What's the optimal strategy to win at poker?",
            new ResponseCreationOptions()
            {
                ReasoningOptions = new ResponseReasoningOptions()
                {
                    ReasoningEffortLevel = ResponseReasoningEffortLevel.High,
                },
                Tools =
                {
                    ResponseTool.CreateMcpTool("my-mcp-server", "https://example.com/mcp", [{"Authorization", "Bearer: {AUTH_TOKEN}"}])
                }
            });

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestCategory: A new feature or enhancement to an existing feature is being requested.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions