feat: add network mode with combined HTTP and SSE endpoints
- Add new 'network' transport mode that serves both HTTP and SSE endpoints simultaneously - HTTP endpoint available on specified port (/mcp) - SSE endpoint available on port+1 (/sse) - Maintain backward compatibility with stdio, http, sse modes - Update documentation and examples for new network mode - Default to network mode for improved user experience 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
10
cmd/cmd.go
10
cmd/cmd.go
@@ -20,14 +20,14 @@ func init() {
|
||||
flag.StringVar(
|
||||
&flagPkg.Mode,
|
||||
"t",
|
||||
"stdio",
|
||||
"Transport type (stdio, sse or http)",
|
||||
"network",
|
||||
"Transport type (stdio, http, sse, or network). Network mode starts both HTTP and SSE servers",
|
||||
)
|
||||
flag.StringVar(
|
||||
&flagPkg.Mode,
|
||||
"transport",
|
||||
"stdio",
|
||||
"Transport type (stdio, sse or http)",
|
||||
"network",
|
||||
"Transport type (stdio, http, sse, or network). Network mode starts both HTTP and SSE servers",
|
||||
)
|
||||
flag.StringVar(
|
||||
&host,
|
||||
@@ -39,7 +39,7 @@ func init() {
|
||||
&port,
|
||||
"port",
|
||||
8080,
|
||||
"see or http port",
|
||||
"Network server port (used for both HTTP and SSE endpoints)",
|
||||
)
|
||||
flag.StringVar(
|
||||
&token,
|
||||
|
||||
Reference in New Issue
Block a user