@mctx-ai/mcp-dev 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/server.js +5 -3
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -117,14 +117,16 @@ function formatError(error, rpcRequest) {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
|
-
* Create Request-like object compatible with app's fetch handler
|
|
120
|
+
* Create Request-like object compatible with app's fetch handler.
|
|
121
|
+
* headers must be a Headers instance (not a plain object) so that
|
|
122
|
+
* request.headers.get(...) works in packages/server/src/server.js.
|
|
121
123
|
*/
|
|
122
124
|
function createRequest(body) {
|
|
123
125
|
return {
|
|
124
126
|
method: "POST",
|
|
125
|
-
headers: {
|
|
127
|
+
headers: new Headers({
|
|
126
128
|
"content-type": "application/json",
|
|
127
|
-
},
|
|
129
|
+
}),
|
|
128
130
|
async json() {
|
|
129
131
|
return body;
|
|
130
132
|
},
|