Add HTTP Transport to MCP Server #19
Open
+106
−75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Add HTTP (Streamable) transport capability to the MetaTrader MCP server, enabling integration with HTTP-based MCP clients and tools (e.g., Open WebUI) alongside the existing stdio transport.
What's Changed
Main Feature: HTTP Transport
--transport httpoption to CLI for running the MCP server as an HTTP endpointPOST /mcpfor request/response handling--transport stdio(default)Supporting Changes
Environment Variable Consolidation (side effect of adding transport option):
MT5_LOGIN,MT5_PASSWORD,MT5_SERVER,MT5_PATHvariablesTesting
All three interfaces verified working with real MT5 credentials:
metatrader-mcp-server(stdio transport)metatrader-mcp-server --transport http(HTTP transport)metatrader-http-server(OpenAPI REST)Breaking Changes
Environment variables renamed:
LOGIN→MT5_LOGINPASSWORD→MT5_PASSWORDSERVER→MT5_SERVERPATH→MT5_PATHUpdate your
.envfile or shell environment accordingly.