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:
b3nw
2025-07-13 17:26:12 +00:00
parent da08718e24
commit e3f7405cd8
4 changed files with 64 additions and 23 deletions

View File

@@ -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,