Skip to content

feat: Add MCP 2025-11-25 example server and test client#91

Merged
simonx1 merged 2 commits intomainfrom
feature/mcp-2025-11-25-examples
Feb 15, 2026
Merged

feat: Add MCP 2025-11-25 example server and test client#91
simonx1 merged 2 commits intomainfrom
feature/mcp-2025-11-25-examples

Conversation

@simonx1
Copy link
Owner

@simonx1 simonx1 commented Feb 14, 2026

Adds comprehensive examples demonstrating all new MCP 2025-11-25 features:

Python server (examples/mcp_2025_11_25_server.py):

  • Audio content (base64 WAV)
  • Resource annotations with lastModified
  • Tool annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint)
  • Enhanced sampling with modelPreferences
  • Completion with context parameter
  • ResourceLink in tool results
  • Task lifecycle (create/get/cancel)

Ruby test client (examples/test_mcp_2025_11_25.rb):

  • Connects via stdio, tests each feature with PASS/FAIL output

Note: This branch includes all 9 feature branches merged together. Merge the individual PRs (#81-#89) first, then rebase this.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c8fe47d22

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

progress: json['progress'] || json[:progress],
total: json['total'] || json[:total],
message: json['message'] || json[:message],
result: json['result'] || json[:result],

Choose a reason for hiding this comment

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

P2 Badge Preserve false task results when parsing JSON

Task.from_json reads result with json['result'] || json[:result], so a valid boolean false result is treated as missing and becomes nil. Tasks can return primitive JSON values, so this silently corrupts task outcomes (for example, a completed check that returned false) when clients parse server responses.

Useful? React with 👍 / 👎.

result['progress'] = @progress if @progress
result['total'] = @total if @total
result['message'] = @message if @message
result['result'] = @result if @result

Choose a reason for hiding this comment

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

P2 Badge Preserve false task results when serializing tasks

Task#to_h only includes 'result' when @result is truthy, which drops legitimate boolean false results from serialized task payloads. Any code that logs, caches, or forwards task state through to_h/to_json will lose the original result semantics and conflate false with "no result".

Useful? React with 👍 / 👎.

begin
result = srv.rpc_request('tasks/create', rpc_params)
MCPClient::Task.from_json(result, server: srv)
rescue MCPClient::Errors::ServerError, MCPClient::Errors::TransportError => e

Choose a reason for hiding this comment

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

P2 Badge Catch ConnectionError in task operations

create_task rescues ServerError/TransportError but not ConnectionError, even though rpc_request raises ConnectionError on auth/network failures. In those paths this method (and the same pattern in get_task/cancel_task) leaks a different exception type instead of the documented TaskError, making task failure handling inconsistent for callers.

Useful? React with 👍 / 👎.

@simonx1 simonx1 force-pushed the feature/mcp-2025-11-25-examples branch from 70694b7 to de79694 Compare February 15, 2026 00:57
- examples/mcp_2025_11_25_server.py: Python FastMCP server demonstrating
  audio content, resource annotations, tool annotations, sampling,
  completion with context, ResourceLink, and tasks
- examples/test_mcp_2025_11_25.rb: Ruby client testing all features
  with clear PASS/FAIL output
@simonx1 simonx1 force-pushed the feature/mcp-2025-11-25-examples branch from de79694 to 16304e2 Compare February 15, 2026 00:58
create_task, get_task, and cancel_task now rescue ConnectionError
alongside ServerError and TransportError, wrapping it as TaskError
for consistent error handling.
@simonx1 simonx1 merged commit 4d2504e into main Feb 15, 2026
3 checks passed
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.

1 participant