Skip to content

DynamoDB: FastMCP.__init__() got an unexpected keyword argument 'version' #996

@neelmitra

Description

@neelmitra

Describe the bug

All my working code using dynamodb mcp has started failing with the below error. The MCP clients are failing to initialize for the following.

aws_ddb_client = MCPClient(
lambda: stdio_client(
StdioServerParameters(
command="uvx",
args=[
"awslabs.dynamodb-mcp-server@latest"
],
env={
"DDB-MCP-READONLY": "false",
"AWS_PROFILE": "default",
"AWS_REGION": "us-east-1",
"FASTMCP_LOG_LEVEL": "ERROR"
},
disabled=False,
autoApprove=[]
)
)
)

Expected Behavior

MCP client should initialize successfully.

Current Behavior

Traceback (most recent call last):
File "/Users/indranem/.cache/uv/archive-v0/nt_jaja3XGQnmjA1kssMi/bin/awslabs.dynamodb-mcp-server", line 6, in
from awslabs.dynamodb_mcp_server.server import main
File "/Users/indranem/.cache/uv/archive-v0/nt_jaja3XGQnmjA1kssMi/lib/python3.13/site-packages/awslabs/dynamodb_mcp_server/server.py", line 56, in
app = FastMCP(
name='dynamodb-server',
...<51 lines>...
version='0.1.3',
)
TypeError: FastMCP.init() got an unexpected keyword argument 'version'
client failed to initialize

  • Exception Group Traceback (most recent call last):
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/strands/tools/mcp/mcp_client.py", line 107, in start
    | self._init_future.result(timeout=30)
    | ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
    | File "/opt/homebrew/Cellar/[email protected]/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/concurrent/futures/_base.py", line 456, in result
    | return self.__get_result()
    | ~~~~~~~~~~~~~~~~~^^
    | File "/opt/homebrew/Cellar/[email protected]/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
    | raise self._exception
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/strands/tools/mcp/mcp_client.py", line 223, in _async_background_thread
    | async with self.transport_callable() as (read_stream, write_stream, *):
    | ~~~~~~~~~~~~~~~~~~~~~~~~^^
    | File "/opt/homebrew/Cellar/[email protected]/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/contextlib.py", line 235, in aexit
    | await self.gen.athrow(value)
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/mcp/client/stdio/init.py", line 173, in stdio_client
    | anyio.create_task_group() as tg,
    | ~~~~~~~~~~~~~~~~~~~~~~~^^
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/anyio/_backends/_asyncio.py", line 772, in aexit
    | raise BaseExceptionGroup(
    | "unhandled errors in a TaskGroup", self._exceptions
    | ) from None
    | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
    +-+---------------- 1 ----------------
    | Exception Group Traceback (most recent call last):
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/mcp/client/stdio/init.py", line 179, in stdio_client
    | yield read_stream, write_stream
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/strands/tools/mcp/mcp_client.py", line 225, in _async_background_thread
    | async with ClientSession(read_stream, write_stream) as session:
    | ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/mcp/shared/session.py", line 218, in aexit
    | return await self._task_group.aexit(exc_type, exc_val, exc_tb)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/anyio/_backends/_asyncio.py", line 772, in aexit
    | raise BaseExceptionGroup(
    | "unhandled errors in a TaskGroup", self._exceptions
    | ) from None
    | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
    +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/strands/tools/mcp/mcp_client.py", line 227, in _async_background_thread
    | await session.initialize()
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/mcp/client/session.py", line 123, in initialize
    | result = await self.send_request(
    | ^^^^^^^^^^^^^^^^^^^^^^^^
    | ...<15 lines>...
    | )
    | ^
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/mcp/shared/session.py", line 286, in send_request
    | raise McpError(response_or_error.error)
    | mcp.shared.exceptions.McpError: Connection closed
    +------------------------------------
  • Exception Group Traceback (most recent call last):
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/strands/tools/mcp/mcp_client.py", line 107, in start
    | self._init_future.result(timeout=30)
    | ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
    | File "/opt/homebrew/Cellar/[email protected]/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/concurrent/futures/_base.py", line 456, in result
    | return self.__get_result()
    | ~~~~~~~~~~~~~~~~~^^
    | File "/opt/homebrew/Cellar/[email protected]/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
    | raise self._exception
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/strands/tools/mcp/mcp_client.py", line 223, in _async_background_thread
    | async with self.transport_callable() as (read_stream, write_stream, *):
    | ~~~~~~~~~~~~~~~~~~~~~~~~^^
    | File "/opt/homebrew/Cellar/[email protected]/3.13.5/Frameworks/Python.framework/Versions/3.13/lib/python3.13/contextlib.py", line 235, in aexit
    | await self.gen.athrow(value)
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/mcp/client/stdio/init.py", line 173, in stdio_client
    | anyio.create_task_group() as tg,
    | ~~~~~~~~~~~~~~~~~~~~~~~^^
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/anyio/_backends/_asyncio.py", line 772, in aexit
    | raise BaseExceptionGroup(
    | "unhandled errors in a TaskGroup", self._exceptions
    | ) from None
    | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
    +-+---------------- 1 ----------------
    | Exception Group Traceback (most recent call last):
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/mcp/client/stdio/init.py", line 179, in stdio_client
    | yield read_stream, write_stream
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/strands/tools/mcp/mcp_client.py", line 225, in _async_background_thread
    | async with ClientSession(read_stream, write_stream) as session:
    | ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/mcp/shared/session.py", line 218, in aexit
    | return await self._task_group.aexit(exc_type, exc_val, exc_tb)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/anyio/_backends/_asyncio.py", line 772, in aexit
    | raise BaseExceptionGroup(
    | "unhandled errors in a TaskGroup", self._exceptions
    | ) from None
    | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
    +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/strands/tools/mcp/mcp_client.py", line 227, in _async_background_thread
    | await session.initialize()
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/mcp/client/session.py", line 123, in initialize
    | result = await self.send_request(
    | ^^^^^^^^^^^^^^^^^^^^^^^^
    | ...<15 lines>...
    | )
    | ^
    | File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/mcp/shared/session.py", line 286, in send_request
    | raise McpError(response_or_error.error)
    | mcp.shared.exceptions.McpError: Connection closed
    +------------------------------------

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/mcp_ddb_strands_client.py", line 83, in
with aws_ddb_client, aws_kb_client:
^^^^^^^^^^^^^^
File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/strands/tools/mcp/mcp_client.py", line 80, in enter
return self.start()
~~~~~~~~~~^^
File "/Users/indranem/codespace/mcp/clients/strands_client/smart-home-strands/.venv/lib/python3.13/site-packages/strands/tools/mcp/mcp_client.py", line 113, in start
raise MCPClientInitializationError("the client initialization failed") from e

Reproduction Steps

Tried to reproduce from 2 different applications, both of which were working before, same issue.

Possible Solution

No response

Additional Information/Context

No response

OS

macos 15.5

Server

dynamodb-mcp-server

Server Version

No response

Region experiencing the issue

us-east-1

Other information

No response

Service quota

  • I have reviewed the service quotas for this construct

Metadata

Metadata

Labels

bugSomething isn't workingneeds-triageThis needs to be handled, it is the first automatically assigned label to issues.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions