Skip to content

feat: Upgrade to FastMCP 2.x/MCP 1.25.0 and add HTTP transport mode support#88

Open
hpreston wants to merge 10 commits into
livehybrid:mainfrom
hpreston:http
Open

feat: Upgrade to FastMCP 2.x/MCP 1.25.0 and add HTTP transport mode support#88
hpreston wants to merge 10 commits into
livehybrid:mainfrom
hpreston:http

Conversation

@hpreston
Copy link
Copy Markdown

🤖 AI-Assisted Changes

This PR was completed with assistance from GitHub Copilot using Claude Sonnet 4.5.

Overview

Major version bump to 0.4.0 including comprehensive dependency upgrades, FastMCP 2.x migration, and HTTP transport mode support. This update brings the Splunk MCP server up to date with the latest MCP protocol standards and modern Python tooling.

Key Changes

🚀 New Feature: HTTP Transport Mode

Added support for the current MCP standard HTTP transport alongside existing SSE and STDIO modes:

# New: HTTP transport (MCP 1.25 standard)
uv run python splunk_mcp.py http

# Existing modes still work
uv run python splunk_mcp.py sse    # Default (backward compatibility)
uv run python splunk_mcp.py stdio  # Claude Desktop integration

Design Decision: Maintained SSE as default for backward compatibility while documenting HTTP as the recommended mode for new deployments. See CHANGES/HTTP_MODE_SUPPORT.md for migration guidance.

📦 Dependency Upgrades

  • MCP SDK: 1.5.0 → 1.25.0 (adds HTTP transport specification)
  • FastMCP: 0.4.0 → 2.14.3 (native HTTP transport support)
  • FastAPI: 0.104.0 → 0.128.0
  • Pydantic: 2.0.0 → 2.12.5
  • uvicorn: 0.23.1 → 0.40.0
  • pytest: 8.3.0 → 9.0.2
  • Plus updates to pytest-asyncio, aiohttp, black, and other dev dependencies

🔧 Breaking Changes & Fixes

  • Updated FastMCP import path (mcp.server.fastmcpfastmcp)
  • Migrated FastMCP constructor API (descriptioninstructions, removed deprecated host/port)
  • Refactored all test files to use FastMCP 2.x direct function invocation pattern
  • Fixed exception type expectations in test assertions
  • Added HTTP mode to valid transport options in CLI and documentation

✅ Test Results

All 34 tests passing across test_mcp.py and test_endpoints_pytest.py

Documentation

Migration Notes

For Existing Deployments

No action required - SSE mode remains the default. Existing deployments continue working without changes.

For New Deployments

Recommended: Use HTTP mode for alignment with MCP 1.25 standard:

uv run python splunk_mcp.py http

For Testing

FastMCP 2.x changed the testing API from mcp.call_tool() to direct function invocation via .fn attribute. See upgrade guide for migration patterns if you have custom tests.

Testing

Run tests with: uv run pytest --cov=splunk_mcp

Docker validation: ./run_tests.sh --docker

Transport Mode Comparison

Feature HTTP Mode SSE Mode STDIO Mode
MCP Standard ✅ Current (1.25) ⚠️ Legacy ✅ Standard for desktop
Use Case Web clients, APIs Legacy web clients Claude Desktop
Endpoint /mcp /sse stdin/stdout
Default No Yes Explicit opt-in
Recommended ✅ New deployments ⚠️ Migrate when ready ✅ Desktop apps

Version History

  • 0.4.0 (2026-01-20): FastMCP 2.x migration, MCP 1.25 support, HTTP transport mode
  • 0.3.0 (previous): Initial SSE and STDIO transport support

Test updates (test_mcp.py & test_endpoints_pytest.py):

Updated imports to access .fn attribute from FunctionTool wrappers
Changed all tests to call functions directly instead of mcp.call_tool()
Fixed assertions to expect correct exception types
Updated test_list_tools to use mcp.get_tools() (async)
Updated test_tools_registration to check for get_tools instead of call_tool
Test Results: ✅ 34/34 tests passing
* FastMCP, MCP package upgrades
* additon of HTTP mode for MCP server
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