Skip to content

Commit f2947cf

Browse files
committed
[CPL-20711] disable auth and add http transport inspector script
1 parent c90df63 commit f2947cf

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

config/mcp-inspector/development.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@
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
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
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"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
```
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
import type { Request, Response, NextFunction } from 'express'
22

33
export 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
}

0 commit comments

Comments
 (0)