Skip to content

mcp(tests): Add integration tests for resources via real MCP protocol #649

@tony

Description

@tony

Context

tests/mcp/test_resources.py uses a MockMCP class that captures decorated functions and calls them directly. This never exercises FastMCP's URI routing, parameter encoding/decoding, or actual MCP protocol handling.

Problem

The test suite validates that resource functions work correctly, but doesn't validate that:

  • Resource URIs are correctly routed by FastMCP
  • Parameter values (especially with special chars) are properly encoded/decoded
  • JSON responses are properly formatted for MCP clients
  • Integration with the actual MCP server transport works

Proposed Solution

Add integration tests that use fastmcp.Client (or equivalent) to make real read_resource() calls against the registered MCP server, exercising the full FastMCP protocol stack.

Files

  • tests/mcp/test_resources.py — current mock-based tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    MCPMCP server (src/libtmux/mcp/)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions