Repository navigation
Conversation
Migrate the file reader server to mcp.server.mcpserver.MCPServer and read Tool.input_schema in MCPClient.list_tools. Add the missing concordia/contrib/tools/__init__.py so the module is packaged and importable by tests, and add the first tests for this folder.
jzleibo
approved these changes
Nov 8, 2026
copybara-service Bot
pushed a commit
that referenced
this pull request
Nov 9, 2026
-- 6f86d61 by 1Ash0 <asmitshaw3533@gmail.com>: Fix MCP example server and client for mcp 2.x Migrate the file reader server to mcp.server.mcpserver.MCPServer and read Tool.input_schema in MCPClient.list_tools. Add the missing concordia/contrib/tools/__init__.py so the module is packaged and importable by tests, and add the first tests for this folder. COPYBARA_INTEGRATE_REVIEW=#466 from 1Ash0:fix/mcp-v2-compat 6f86d61 PiperOrigin-RevId: 1017276509 Change-Id: I4e828cb43fc2e84b16ff3abad305502345b8ba40
This branch has not been deployed
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.
Summary
Makes the bundled MCP example work with
mcp2.x, the version pinned inrequirements.txt.servers/file_reader_server.py:mcp.server.fastmcpwas removed in v2; usemcp.server.mcpserver.MCPServer.mcp_client.py:MCPClient.list_tools()readtool.inputSchema, which isinput_schemain v2 and raisedAttributeError. This second breakage is not mentioned in the issue. Removed thepyrefly: ignorecomments that were hiding both errors.concordia/contrib/tools/__init__.py. Without itfind_packagesskips the folder (so the MCP module is likely not shipped bypip install gdm-concordia[mcp]), and pytest put the folder onsys.path, soimport mcpfound the localmcp/directory instead of the library.mcpis not installed.This is v2-only, to match the pin. I did not touch
setup.py(themcpextra is still unbounded) orrequirements.txt.Fixes #435
Validation
Ubuntu 24.04, Python 3.14, installed with
bin/install.sh(hash-pinnedrequirements.txt):pytest concordia: 1456 passed, 80 skippedpylint --errors-only concordia: no errorspyrefly check concordia: 0 errorsAlso:
main, 5 of the 6 new tests fail with thefastmcpImportError and theinputSchemaAttributeError; with the fix all 6 pass.mcpinstalled, the 6 tests skip instead of failing.pyink --checkandisort --check --profile googleare clean.