Skip to content

Conversation

@JAORMX
Copy link
Collaborator

@JAORMX JAORMX commented Nov 4, 2025

What

Adds end-to-end tests for remote MCP server functionality to verify thv run works correctly with remote servers.

Why

We document how to run remote MCP servers in our user guide, but we had no automated tests to verify this functionality actually works. This PR adds comprehensive e2e tests using the mcp-spec remote server from the registry.

Changes

  • New test file: test/e2e/remote_mcp_server_test.go
  • 9 tests covering: registry-based remote servers, custom URL remote servers, and lifecycle operations
  • Tests use JSON output parsing and follow existing e2e test patterns

Testing

All 9 tests pass locally:

Ran 9 of 157 Specs in 27.726 seconds
SUCCESS! -- 9 Passed | 0 Failed

Tests are labeled with "mcp" and will run in the e2e-tests-core (mcp) CI job.

JAORMX and others added 2 commits November 4, 2025 09:14
This commit adds comprehensive end-to-end tests for remote MCP server
functionality, verifying that `thv run` works correctly with remote
servers as documented in the user guide.

The tests cover:
- Starting remote servers from the registry (mcp-spec)
- Starting remote servers with explicit URLs
- Verifying the `remote` flag is set correctly in workload metadata
- Testing MCP protocol operations (initialize, ping, list tools)
- Calling tools on remote servers (SearchModelContextProtocol)
- Server lifecycle management (stop, restart, logs)

All tests use JSON output parsing for robust validation and follow
existing e2e test patterns. Tests are labeled with "mcp" to run in
the appropriate CI worker group.

Tests verify:
- No containers are created for remote servers
- Package field shows "remote"
- Tool type is "remote"
- Remote boolean flag is true
- Transport defaults to streamable-http
- Full MCP protocol compliance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.36%. Comparing base (6a13511) to head (065961f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2444      +/-   ##
==========================================
+ Coverage   55.34%   55.36%   +0.01%     
==========================================
  Files         277      277              
  Lines       26451    26451              
==========================================
+ Hits        14639    14644       +5     
+ Misses      10467    10457      -10     
- Partials     1345     1350       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JAORMX JAORMX merged commit 538b803 into main Nov 4, 2025
29 checks passed
@JAORMX JAORMX deleted the add-remote-mcp-e2e-tests branch November 4, 2025 10:30
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.

3 participants