Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 301d829

Browse filesBrowse files
Max payload size config for MCP SSE client
1 parent d35e774 commit 301d829
Copy full SHA for 301d829

File tree

Expand file treeCollapse file tree

3 files changed

+5
-2
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+5
-2
lines changed

‎cmd/server/config.go

Copy file name to clipboardExpand all lines: cmd/server/config.go
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ type openrouterConfig struct {
5656
}
5757

5858
type mcpSSEServerConfig struct {
59-
URL string `yaml:"url"`
59+
URL string `yaml:"url"`
60+
MaxPayloadSize int `yaml:"maxPayloadSize"`
6061
}
6162

6263
type mcpStdIOServerConfig struct {

‎cmd/server/main.go

Copy file name to clipboardExpand all lines: cmd/server/main.go
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ func populateMCPClients(cfg config, mcpClientInfo mcp.Info) ([]*mcp.Client, []*e
247247
var mcpClients []*mcp.Client
248248

249249
for _, mcpSSEServerConfig := range cfg.MCPSSEServers {
250-
sseClient := mcp.NewSSEClient(mcpSSEServerConfig.URL, nil)
250+
sseClient := mcp.NewSSEClient(mcpSSEServerConfig.URL, nil,
251+
mcp.WithSSEClientMaxPayloadSize(mcpSSEServerConfig.MaxPayloadSize))
251252
cli := mcp.NewClient(mcpClientInfo, sseClient)
252253
mcpClients = append(mcpClients, cli)
253254
}

‎config.example.yaml

Copy file name to clipboardExpand all lines: config.example.yaml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ genTitleLLM: # Default to the same LLM as the main LLM
6060
mcpSSEServers:
6161
filesystem:
6262
url: https://yoursseserver.com
63+
maxPayloadSize: 1048576 # 1MB
6364
mcpStdIOServers:
6465
filesystem:
6566
command: npx

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.