Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Connect with MCP server running on local #78

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

Closed
totaland opened this issue Jun 11, 2025 · 1 comment · Fixed by #80
Closed

Connect with MCP server running on local #78

totaland opened this issue Jun 11, 2025 · 1 comment · Fixed by #80
Labels

Comments

@totaland
Copy link

totaland commented Jun 11, 2025

Please read this first

  • Have you read the docs? Agents SDK docs
    Yes
  • Have you searched for related issues? Others may have had similar requests
    Yes

Describe the feature

I am currently have a MCPServer created with model context protocol library and it running locally. In the same express app I want to create a new endpoint to work with multi-agents architecture but currently, we don't support that. Since the MCP tools from what I read only work with stdio MCPServer?

  const mcpServer = new MCPServerStdio({
    name: 'Filesystem Server, via npx',
    fullCommand: `npx -y @modelcontextprotocol/server-filesystem ${samplesDir}`,
    // Or passing command and args
    // command: 'npx',
    // args: ['-y', '@modelcontextprotocol/server-filesystem', samplesDir],
  });

And you kind of have to do it like above which doesn't make sense.

We should just be able to pass in server name and the local url or url to work with and the library should automatically discover the list of mcp tools to use.

Or we do it similar to what Vercel AI Sdk does and pass it to the model creation call.

  const mcpClient = await experimental_createMCPClient({
    transport: mcpTransportInstance,
    onUncaughtError,
  });

  const tools = await mcpClient.tools();

What is the feature you're requesting? How would it work? Please provide examples and details if possible.

@totaland totaland added the enhancement New feature or request label Jun 11, 2025
@seratch
Copy link
Member

seratch commented Jun 11, 2025

Hi @totaland, thanks for asking your question. For the initial release, we only had the bandwidth to support stdio for local MCP connections, but we also plan to add support for a streamable HTTP server.

dkundel-openai pushed a commit that referenced this issue Jun 11, 2025
* Add remote MCP server (Streamable HTTP) support; fixes #78

* Fix tests

* Add npm command

* Add changeset

* simplify the example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants