Skip to content

feat(OpenAI): Add support for Remote MCP Tool #601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

trandbert37
Copy link
Contributor

@trandbert37 trandbert37 commented Jun 12, 2025

What:

  • Bug Fix
  • New Feature

Description:

Add support for Remote MCP tool in Responses: https://platform.openai.com/docs/guides/tools-remote-mcp

Related:

fixes #583

@trandbert37 trandbert37 marked this pull request as draft June 12, 2025 16:03
@iBotPeaches
Copy link
Collaborator

Looks pretty close. Just a few lint warnings and I think good to go.

@trandbert37 trandbert37 marked this pull request as ready for review June 13, 2025 14:25
@trandbert37 trandbert37 force-pushed the feature/add-support-for-remote-mcp-tool branch from 672b8d9 to a4142fa Compare June 13, 2025 14:32
Copy link
Collaborator

@iBotPeaches iBotPeaches left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for doing this! I've gotten busy so appreciate the help. You've helped me discover I missed streaming for image generation.

I put some comments on some mismatched variable types. I wonder if there is any sample hello world MCP servers that are accessible for real-life testing of this

@iBotPeaches
Copy link
Collaborator

I worked a bit on streaming today because it seemed Image Generation streaming was busted. I added that here: 0a29b39 and my real life sample test here - https://github.com/iBotPeaches/openai-php-laravel-test/blob/master/app/Console/Commands/ResponsesImageGenerationTest.php

Sorry as that caused some conflicts here, but it should help overall as it boosted the streaming support for responses.

trandbert37 and others added 4 commits June 16, 2025 09:37
# Conflicts:
#	src/Responses/Responses/CreateResponse.php
#	src/Responses/Responses/CreateStreamedResponse.php
#	src/Responses/Responses/RetrieveResponse.php
#	src/Responses/Responses/Streaming/OutputItem.php
…ai-php#602)

* feat(OpenAI): Add streaming for ImageGeneration (Responses API)

* fix(OpenAI): `model` is missing on stream and partial images is default 0

* test(OpenAI): image generation steaming test

* fix(OpenAI): add output item (Image Generation)

* fix(OpenAI): add output item (Image Generation)

* test(OpenAI): enhanced stream testing

* fix(OpenAI): image generation streaming fixes

* fix(OpenAI): proper type

* chore(OpenAI): align test to stream mock

* fix(OpenAI): result is missing on partial image failure
# Conflicts:
#	src/Responses/Responses/CreateResponse.php
#	src/Responses/Responses/CreateStreamedResponse.php
#	src/Responses/Responses/RetrieveResponse.php
#	src/Responses/Responses/Streaming/OutputItem.php
# Conflicts:
#	src/Responses/Responses/CreateResponse.php
#	src/Responses/Responses/CreateStreamedResponse.php
#	src/Responses/Responses/RetrieveResponse.php
#	src/Responses/Responses/Streaming/OutputItem.php
@trandbert37 trandbert37 force-pushed the feature/add-support-for-remote-mcp-tool branch from d7ab3ad to 28595da Compare June 16, 2025 07:39
@iBotPeaches
Copy link
Collaborator

Nice work! Appears to be passing CI and I'll run a real life test today at work and merge if so.

@iBotPeaches iBotPeaches changed the title Add support for Remote MCP Tool feat(OpenAI): Add support for Remote MCP Tool Jun 16, 2025
@iBotPeaches
Copy link
Collaborator

@trandbert37
Copy link
Contributor Author

Perfect, thanks for the tests 🎉

@iBotPeaches iBotPeaches merged commit f35ffdf into openai-php:main Jun 16, 2025
12 checks passed
@iBotPeaches
Copy link
Collaborator

thanks and congrats on 1st pr!

@iBotPeaches iBotPeaches added this to the v0.14.0 milestone Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Responses] Support MCP Tool Usage
2 participants