mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-21 15:36:48 +00:00
fix: env parameters exception when configuring SSE or HTTP MCP server (#513)
* fix: _create_streamable_http_session() got an unexpected keyword argument 'env' fix unit error * update md --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
@@ -10,7 +10,10 @@ class MCPServerMetadataRequest(BaseModel):
|
||||
"""Request model for MCP server metadata."""
|
||||
|
||||
transport: str = Field(
|
||||
..., description="The type of MCP server connection (stdio or sse)"
|
||||
...,
|
||||
description=(
|
||||
"The type of MCP server connection (stdio or sse or streamable_http)"
|
||||
),
|
||||
)
|
||||
command: Optional[str] = Field(
|
||||
None, description="The command to execute (for stdio type)"
|
||||
@@ -21,7 +24,12 @@ class MCPServerMetadataRequest(BaseModel):
|
||||
url: Optional[str] = Field(
|
||||
None, description="The URL of the SSE server (for sse type)"
|
||||
)
|
||||
env: Optional[Dict[str, str]] = Field(None, description="Environment variables")
|
||||
env: Optional[Dict[str, str]] = Field(
|
||||
None, description="Environment variables (for stdio type)"
|
||||
)
|
||||
headers: Optional[Dict[str, str]] = Field(
|
||||
None, description="HTTP headers (for sse/streamable_http type)"
|
||||
)
|
||||
timeout_seconds: Optional[int] = Field(
|
||||
None, description="Optional custom timeout in seconds for the operation"
|
||||
)
|
||||
@@ -31,7 +39,10 @@ class MCPServerMetadataResponse(BaseModel):
|
||||
"""Response model for MCP server metadata."""
|
||||
|
||||
transport: str = Field(
|
||||
..., description="The type of MCP server connection (stdio or sse)"
|
||||
...,
|
||||
description=(
|
||||
"The type of MCP server connection (stdio or sse or streamable_http)"
|
||||
),
|
||||
)
|
||||
command: Optional[str] = Field(
|
||||
None, description="The command to execute (for stdio type)"
|
||||
@@ -42,7 +53,12 @@ class MCPServerMetadataResponse(BaseModel):
|
||||
url: Optional[str] = Field(
|
||||
None, description="The URL of the SSE server (for sse type)"
|
||||
)
|
||||
env: Optional[Dict[str, str]] = Field(None, description="Environment variables")
|
||||
env: Optional[Dict[str, str]] = Field(
|
||||
None, description="Environment variables (for stdio type)"
|
||||
)
|
||||
headers: Optional[Dict[str, str]] = Field(
|
||||
None, description="HTTP headers (for sse/streamable_http type)"
|
||||
)
|
||||
tools: List = Field(
|
||||
default_factory=list, description="Available tools from the MCP server"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user