Skip to content

Conversation

@koic
Copy link
Member

@koic koic commented Jan 17, 2026

Motivation and Context

Fixes CI failures in PR #3220.

PR #3220 updated mcp library from 1.0.0 to 1.23.0, which caused test failures due to a breaking change in McpError constructor API.

The McpError constructor now expects an ErrorData object instead of a plain string message. This commit fixes the usage in get_zoneinfo() function to use ErrorData(code=INVALID_PARAMS, message=...).

Error before fix:
  AttributeError: 'str' object has no attribute 'message'

Also updates mcp dependency to >=1.23.0 in pyproject.toml to ensure compatibility with the new API.

How Has This Been Tested?

Automated tests were run against both the old and new versions of the mcp library.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Fixes CI failures in PR modelcontextprotocol#3220.

PR modelcontextprotocol#3220 updated `mcp` library from 1.0.0 to 1.23.0, which caused test
failures due to a breaking change in `McpError` constructor API.

The `McpError` constructor now expects an `ErrorData` object instead of
a plain string message. This commit fixes the usage in `get_zoneinfo()`
function to use `ErrorData(code=INVALID_PARAMS, message=...)`.

```console
Error before fix:
  AttributeError: 'str' object has no attribute 'message'
```

Also updates `mcp` dependency to >=1.23.0 in pyproject.toml to ensure
compatibility with the new API.
Copy link
Member

@olaservo olaservo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Wonder why this wasn't caught in the PR to update the sdk version.

@olaservo olaservo merged commit 55a3056 into modelcontextprotocol:main Jan 17, 2026
19 checks passed
@koic koic deleted the fix_time_mcp_erro_constructor branch January 17, 2026 23:53
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.

2 participants