feat: support MCP stdio transport protocol - #607
Merged
Merged
Conversation
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.
Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com>
Contributor
Contributor
averikitsch
approved these changes
May 28, 2025
Contributor
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> 🦕
This was referenced Feb 19, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support MCP stdio transport protocol!
To run stdio with Toolbox, user have to use the
--stdioflag.Example of running MCP Toolbox with MCP Inspector via stdio transport protocol:
npx @modelcontextprotocol/inspector ./toolbox --stdio.