Skip to content

Commit 498e49e

Browse files
authored
Merge pull request #1 from shivdeepak/fix-streamable-endpoint
fix cors issue with accessing mcp-session-id header
2 parents 6e4dcd6 + 1ec4e3b commit 498e49e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ const { values } = parseArgs({
3939

4040
const app = express();
4141
app.use(cors());
42+
app.use((req, res, next) => {
43+
res.header("Access-Control-Expose-Headers", "mcp-session-id");
44+
next();
45+
});
4246

4347
const webAppTransports: Map<string, Transport> = new Map<string, Transport>(); // Transports by sessionId
4448

0 commit comments

Comments
 (0)