File tree Expand file tree Collapse file tree 4 files changed +21
-8
lines changed
src/server/transports/http Expand file tree Collapse file tree 4 files changed +21
-8
lines changed Original file line number Diff line number Diff line change 2020 "args" : [
2121 " run" ,
2222 " dev"
23- ]
23+ ],
24+ "env" : {
25+ "TRANSPORT" : " stdio"
26+ }
27+ },
28+ "coupler_http" : {
29+ "type" : " streamable-http" ,
30+ "url" : " http://localhost:3001/mcp"
2431 }
2532 }
2633}
Original file line number Diff line number Diff line change 77 "scripts" : {
88 "start" : " tsx src/index.ts" ,
99 "dev" : " tsx --env-file=.env.local --watch src/index.ts" ,
10- "inspect:node" : " npx mcp-inspector --config config/mcp-inspector/development.json --server coupler_node" ,
10+ "inspect:node" : " npx mcp-inspector --config config/mcp-inspector/development.json --server coupler_node_stdio" ,
11+ "inspect:http" : " npx mcp-inspector --config config/mcp-inspector/development.json --server coupler_http" ,
1112 "inspect:docker" : " npx mcp-inspector --config config/mcp-inspector/development.json --server coupler_docker" ,
1213 "lint" : " eslint src/ --ext .ts" ,
1314 "test" : " vitest run"
Original file line number Diff line number Diff line change 1+ # HTTP transport
2+
3+ ## Setup
4+ ``` shell
5+ # Run server locally
6+ TRANSPORT=http npm run dev
7+
8+ # Run the MCP inspector
9+ npm run inspect:http
10+ ```
Original file line number Diff line number Diff line change 11import type { Request , Response , NextFunction } from 'express'
22
33export const authorize = ( req : Request , res : Response , next : NextFunction ) : void => {
4- const token = req . header ( 'Authorization' ) ?. split ( / \s + / ) [ 1 ]
5-
6- if ( ! token ) {
7- res . status ( 401 ) . json ( { message : 'Unauthorized' } )
8- return
9- }
4+ // TODO: Implement authorization
105
116 next ( )
127}
You can’t perform that action at this time.
0 commit comments