Skip to content

feat: support MCP stdio transport protocol - #607

Merged
averikitsch merged 7 commits into
mainfrom
stdio
May 28, 2025
Merged

averikitsch merged 7 commits into
mainfrom
stdio

Conversation

@Yuan325

@Yuan325 Yuan325 commented May 23, 2025 •

Copy link
Copy Markdown
Contributor

Support MCP stdio transport protocol!

To run stdio with Toolbox, user have to use the --stdio flag.

Example of running MCP Toolbox with MCP Inspector via stdio transport protocol: npx @modelcontextprotocol/inspector ./toolbox --stdio.

Yuan325 added 3 commits May 22, 2025 15:26
Toolbox sends `debug` and `info` logs to `stdout`. However, in order to
stupport stdio, Toolbox **should not** log messages to `stdout` as this
will interfere with protocol operations. `stderr` are fine.

If `--stdio`, Toolbox will not send any `debug` and `info` logs, `warn`
and `error` logs will still work as usual.
Move the message processing step out of mcp's http handler. This will
allow stdio to reuse the same message processing flow.

Due to the separation of message processing, some attributes from the
http post metrics have to be removed.
@Yuan325
Yuan325 requested a review from a team May 23, 2025 17:06
Yuan325 and others added 2 commits May 23, 2025 10:07
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

@averikitsch
averikitsch merged commit 1702ce1 into main May 28, 2025
@averikitsch
averikitsch deleted the stdio branch May 28, 2025 17:10
@github-actions

Copy link
Copy Markdown
Contributor

🧨 Preview deployments removed.

github-actions Bot pushed a commit that referenced this pull request May 28, 2025
Support MCP
[stdio](https://modelcontextprotocol.io/specification/2024-11-05/basic/transports#stdio)
transport protocol!

To run stdio with Toolbox, user have to use the `--stdio` flag.

Example of running MCP Toolbox with MCP Inspector via stdio transport
protocol: `npx @modelcontextprotocol/inspector ./toolbox --stdio`.

---------

Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
Co-authored-by: Averi Kitsch <akitsch@google.com> 1702ce1
github-actions Bot pushed a commit to renovate-bot/googleapis-_-genai-toolbox that referenced this pull request May 28, 2025
Support MCP
[stdio](https://modelcontextprotocol.io/specification/2024-11-05/basic/transports#stdio)
transport protocol!

To run stdio with Toolbox, user have to use the `--stdio` flag.

Example of running MCP Toolbox with MCP Inspector via stdio transport
protocol: `npx @modelcontextprotocol/inspector ./toolbox --stdio`.

---------

Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
Co-authored-by: Averi Kitsch <akitsch@google.com> 1702ce1
averikitsch pushed a commit that referenced this pull request May 28, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.6.0](v0.5.0...v0.6.0)
(2025-05-28)


### Features

* Add Execute sql tool for SQL Server(MSSQL)
([#585](#585))
([6083a22](6083a22))
* Add mysql-execute-sql tool
([#577](#577))
([8590061](8590061))
* Add new BigQuery tools: execute_sql, list_datatset_ids,
list_table_ids, get_dataset_info, get_table_info
([0fd88b5](0fd88b5))
* Add spanner-execute-sql tool
([#576](#576))
([d65747a](d65747a))
* Add support for read-only in Spanner tool
([#563](#563))
([6512704](6512704))
* Adding support for the --prebuilt flag
([#604](#604))
([a29c800](a29c800))
* Support MCP stdio transport protocol
([#607](#607))
([1702ce1](1702ce1))


### Bug Fixes

* Explicitly set query location for BigQuery queries
([#586](#586))
([eb52b66](eb52b66))
* Fix spellings in comments
([#561](#561))
([b58bf76](b58bf76))
* Prevent tool calls through MCP when auth is required
([#544](#544))
([e747b6e](e747b6e))
* Reinitialize required slice if nil
([#571](#571))
([04dcf47](04dcf47)),
closes [#564](#564)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
github-actions Bot pushed a commit that referenced this pull request May 28, 2025
🤖 I have created a release *beep* *boop*
---

##
[0.6.0](v0.5.0...v0.6.0)
(2025-05-28)

### Features

* Add Execute sql tool for SQL Server(MSSQL)
([#585](#585))
([6083a22](6083a22))
* Add mysql-execute-sql tool
([#577](#577))
([8590061](8590061))
* Add new BigQuery tools: execute_sql, list_datatset_ids,
list_table_ids, get_dataset_info, get_table_info
([0fd88b5](0fd88b5))
* Add spanner-execute-sql tool
([#576](#576))
([d65747a](d65747a))
* Add support for read-only in Spanner tool
([#563](#563))
([6512704](6512704))
* Adding support for the --prebuilt flag
([#604](#604))
([a29c800](a29c800))
* Support MCP stdio transport protocol
([#607](#607))
([1702ce1](1702ce1))

### Bug Fixes

* Explicitly set query location for BigQuery queries
([#586](#586))
([eb52b66](eb52b66))
* Fix spellings in comments
([#561](#561))
([b58bf76](b58bf76))
* Prevent tool calls through MCP when auth is required
([#544](#544))
([e747b6e](e747b6e))
* Reinitialize required slice if nil
([#571](#571))
([04dcf47](04dcf47)),
closes [#564](#564)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> 3180830
github-actions Bot pushed a commit to renovate-bot/googleapis-_-genai-toolbox that referenced this pull request May 28, 2025
🤖 I have created a release *beep* *boop*
---

##
[0.6.0](googleapis/mcp-toolbox@v0.5.0...v0.6.0)
(2025-05-28)

### Features

* Add Execute sql tool for SQL Server(MSSQL)
([googleapis#585](googleapis#585))
([6083a22](googleapis@6083a22))
* Add mysql-execute-sql tool
([googleapis#577](googleapis#577))
([8590061](googleapis@8590061))
* Add new BigQuery tools: execute_sql, list_datatset_ids,
list_table_ids, get_dataset_info, get_table_info
([0fd88b5](googleapis@0fd88b5))
* Add spanner-execute-sql tool
([googleapis#576](googleapis#576))
([d65747a](googleapis@d65747a))
* Add support for read-only in Spanner tool
([googleapis#563](googleapis#563))
([6512704](googleapis@6512704))
* Adding support for the --prebuilt flag
([googleapis#604](googleapis#604))
([a29c800](googleapis@a29c800))
* Support MCP stdio transport protocol
([googleapis#607](googleapis#607))
([1702ce1](googleapis@1702ce1))

### Bug Fixes

* Explicitly set query location for BigQuery queries
([googleapis#586](googleapis#586))
([eb52b66](googleapis@eb52b66))
* Fix spellings in comments
([googleapis#561](googleapis#561))
([b58bf76](googleapis@b58bf76))
* Prevent tool calls through MCP when auth is required
([googleapis#544](googleapis#544))
([e747b6e](googleapis@e747b6e))
* Reinitialize required slice if nil
([googleapis#571](googleapis#571))
([04dcf47](googleapis@04dcf47)),
closes [googleapis#564](googleapis#564)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> 3180830
jeffreyrubi pushed a commit to jeffreyrubi/genai-toolbox that referenced this pull request Jun 7, 2025
# Description

Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make
sure it goes smoothly:

- [ ] Follow the [`CONTRIBUTING`
Guide](https://github.com/google/A2A/blob/main/CONTRIBUTING.md).
- [ ] Make your Pull Request title in the
<https://www.conventionalcommits.org/> specification.
- [ ] Ensure the tests and linter pass (Run `nox -s format` from the
repository root to format)
- [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕
NightStack15 added a commit to NightStack15/googleapis-_-genai-toolbox that referenced this pull request Mar 20, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.6.0](googleapis/mcp-toolbox@v0.5.0...v0.6.0)
(2025-05-28)


### Features

* Add Execute sql tool for SQL Server(MSSQL)
([#585](googleapis/mcp-toolbox#585))
([6083a22](googleapis/mcp-toolbox@6083a22))
* Add mysql-execute-sql tool
([#577](googleapis/mcp-toolbox#577))
([8590061](googleapis/mcp-toolbox@8590061))
* Add new BigQuery tools: execute_sql, list_datatset_ids,
list_table_ids, get_dataset_info, get_table_info
([0fd88b5](googleapis/mcp-toolbox@0fd88b5))
* Add spanner-execute-sql tool
([#576](googleapis/mcp-toolbox#576))
([d65747a](googleapis/mcp-toolbox@d65747a))
* Add support for read-only in Spanner tool
([#563](googleapis/mcp-toolbox#563))
([6512704](googleapis/mcp-toolbox@6512704))
* Adding support for the --prebuilt flag
([#604](googleapis/mcp-toolbox#604))
([a29c800](googleapis/mcp-toolbox@a29c800))
* Support MCP stdio transport protocol
([#607](googleapis/mcp-toolbox#607))
([1702ce1](googleapis/mcp-toolbox@1702ce1))


### Bug Fixes

* Explicitly set query location for BigQuery queries
([#586](googleapis/mcp-toolbox#586))
([eb52b66](googleapis/mcp-toolbox@eb52b66))
* Fix spellings in comments
([#561](googleapis/mcp-toolbox#561))
([b58bf76](googleapis/mcp-toolbox@b58bf76))
* Prevent tool calls through MCP when auth is required
([#544](googleapis/mcp-toolbox#544))
([e747b6e](googleapis/mcp-toolbox@e747b6e))
* Reinitialize required slice if nil
([#571](googleapis/mcp-toolbox#571))
([04dcf47](googleapis/mcp-toolbox@04dcf47)),
closes [#564](googleapis/mcp-toolbox#564)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
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.

3 participants