Skip to content

Commit fe32a2a

Browse files
yigitkonurclaude
andcommitted
Fix mcp new --transport flag documentation
Remove incorrect --transport=http option which is not supported. The mcp new command only supports stdio and sse transports. Updated scaffolding examples to use correct transport options and fixed streamable HTTP example to use SSE transport instead. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent c85cfd7 commit fe32a2a

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,11 @@ mcp new tool:calculate --sdk=ts
395395
# Create a project with a specific transport type
396396
mcp new tool:calculate --transport=stdio
397397
mcp new tool:calculate --transport=sse
398-
mcp new tool:calculate --transport=http
399398
```
400399

401400
The scaffolding creates a complete project structure with:
402401

403-
- Server setup with chosen transport (stdio, SSE, or streamable HTTP)
402+
- Server setup with chosen transport (stdio or SSE)
404403
- TypeScript configuration with modern ES modules
405404
- Component implementations with proper MCP interfaces
406405
- Automatic wiring of imports and initialization
@@ -792,28 +791,28 @@ mcp guard --deny tools:write_*,delete_*,create_*,move_* npx -y @modelcontextprot
792791
Create and run a local streamable HTTP server:
793792

794793
```bash
795-
# Create a new MCP server with streamable HTTP transport
796-
mkdir my-http-server && cd my-http-server
797-
mcp new tool:example_tool --transport=http
794+
# Create a new MCP server with SSE transport (streamable HTTP not available in scaffolding)
795+
mkdir my-sse-server && cd my-sse-server
796+
mcp new tool:example_tool --transport=sse
798797

799798
# Install dependencies and build
800799
npm install && npm run build
801800

802-
# Start the server (will run on http://localhost:3000)
801+
# Start the server (will run SSE transport)
803802
npm start
804803
```
805804

806805
In a separate terminal, connect to your local server:
807806

808807
```bash
809-
# Connect to local streamable HTTP server
810-
mcp tools http://localhost:3000
808+
# Connect to local SSE server (adjust URL based on your server's SSE endpoint)
809+
mcp tools http://localhost:3000/sse
811810

812811
# Call a tool on the local server
813-
mcp call example_tool --params '{"input": "test"}' http://localhost:3000
812+
mcp call example_tool --params '{"input": "test"}' http://localhost:3000/sse
814813

815814
# Use with different output formats
816-
mcp tools --format pretty http://localhost:3000
815+
mcp tools --format pretty http://localhost:3000/sse
817816
```
818817

819818
Connect to remote streamable HTTP servers:

0 commit comments

Comments
 (0)