Skip to content

Commit 67722ae

Browse files
authored
Merge branch 'main' into fix-env-var-parsing
2 parents 60c4645 + cedf02d commit 67722ae

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

client/src/components/SamplingTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const SamplingTab = ({ pendingRequests, onApprove, onReject }: Props) => {
4343
<h3 className="text-lg font-semibold">Recent Requests</h3>
4444
{pendingRequests.map((request) => (
4545
<div key={request.id} className="p-4 border rounded-lg space-y-4">
46-
<pre className="bg-gray-50 p-2 rounded">
46+
<pre className="bg-gray-50 dark:bg-gray-800 dark:text-gray-100 p-2 rounded">
4747
{JSON.stringify(request.request, null, 2)}
4848
</pre>
4949
<div className="flex space-x-2">

client/src/lib/hooks/useConnection.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
ListRootsRequestSchema,
1111
ProgressNotificationSchema,
1212
ResourceUpdatedNotificationSchema,
13+
LoggingMessageNotificationSchema,
1314
Request,
1415
Result,
1516
ServerCapabilities,
@@ -26,6 +27,7 @@ import { SESSION_KEYS } from "../constants";
2627
import { Notification, StdErrNotificationSchema } from "../notificationTypes";
2728
import { auth } from "@modelcontextprotocol/sdk/client/auth.js";
2829
import { authProvider } from "../auth";
30+
import packageJson from "../../../package.json";
2931

3032
const params = new URLSearchParams(window.location.search);
3133
const DEFAULT_REQUEST_TIMEOUT_MSEC =
@@ -205,7 +207,7 @@ export function useConnection({
205207
const client = new Client<Request, Notification, Result>(
206208
{
207209
name: "mcp-inspector",
208-
version: "0.0.1",
210+
version: packageJson.version,
209211
},
210212
{
211213
capabilities: {
@@ -257,6 +259,11 @@ export function useConnection({
257259
ResourceUpdatedNotificationSchema,
258260
onNotification,
259261
);
262+
263+
client.setNotificationHandler(
264+
LoggingMessageNotificationSchema,
265+
onNotification,
266+
);
260267
}
261268

262269
if (onStdErrNotification) {

server/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ const createTransport = async (req: express.Request) => {
6666
return transport;
6767
} else if (transportType === "sse") {
6868
const url = query.url as string;
69-
const headers: HeadersInit = {};
69+
const headers: HeadersInit = {
70+
Accept: "text/event-stream",
71+
};
7072
for (const key of SSE_HEADERS_PASSTHROUGH) {
7173
if (req.headers[key] === undefined) {
7274
continue;

0 commit comments

Comments
 (0)