microsoft / microsoft/Dataverse-skills
dataverse_mcp_bridge.py reference script is incompatible with current mcp PyPI package (2.1.1)
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 226
- Forks
- 61
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 7
Description
Bug 3 — dataverse_mcp_bridge.py reference script is incompatible with current mcp PyPI package (2.1.1)
This is in the plugin's own bundled Python bridge script ( scripts/dataverse_mcp_bridge.py , part of the Dataverse Copilot/Claude skills plugin), used as the broker-free fallback MCP transport. Installing the plugin's stated dependencies ( pip install anyio httpx2 mcp ) currently pulls mcp==2.1.1 , which has breaking API changes vs. what the script was written against:
3a. streamable_http_client now yields a 2-tuple, not 3-tuple
ValueError: not enough values to unpack (expected 3, got 2)
at:
async with streamable_http_client(...) as (remote_read, remote_write, _get_session_id):
mcp/client/streamable_http.py (2.1.1) now does yield read_stream, write_stream only (no get_session_id ).
Fix applied:
async with streamable_http_client(DATAVERSE_MCP_URL, http_client=http_client) as streams:
remote_read, remote_write = streams[0], streams[1]
3b. mcp.server.lowlevel.Server no longer supports decorator-based handler registration
AttributeError: 'Server' object has no attribute 'list_tools'
at:
@server.list_tools()
async def list_tools() -> types.ListToolsResult: ...
@server.call_tool()
async def call_tool(name, arguments) -> types.CallToolResult: ...
2.1.1's Server.__init__ replaced these decorators with constructor-injected callables on_list_tools / on_call_tool , each taking (ctx, params) .
Fix applied:
async def on_list_tools(ctx, params):
return await remote.list_tools()
async def on_call_tool(ctx, params):
return await remote.call_tool(params.name, params.arguments)
server = Server(
"dataverse-org0226e1cd",
version="1.0.0",
on_list_tools=on_list_tools,
on_call_tool=on_call_tool,
)
Verified: After both fixes, a manual JSON-RPC initialize request through the bridge returned a valid response from the live .crm3.dynamics.com/api/mcp endpoint.
Ask: Either pin the plugin's documented mcp dependency to a version compatible with the bundled bridge script (e.g. mcp<2.0 if that's the last decorator-API release), or update dataverse_mcp_bridge.py in the plugin repo to the constructor-based API shown above so a fresh pip install doesn't silently break the fallback bridge.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with scripts/dataverse_mcp_bridge.py and compare its streamable_http_client usage and Server setup with the installed mcp 2.1.1 API. Reproduce the fallback bridge with a fresh dependency install, then send a JSON-RPC initialize request to confirm it returns a valid response from the Dataverse MCP endpoint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 76/100