Skip to content

Commit 6c27f5a

Browse files
committed
Upgrade to SDK 0.5.0
1 parent 2bf84a3 commit 6c27f5a

File tree

5 files changed

+24
-12
lines changed

5 files changed

+24
-12
lines changed

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"preview": "vite preview"
2323
},
2424
"dependencies": {
25-
"@modelcontextprotocol/sdk": "*",
25+
"@modelcontextprotocol/sdk": "0.5.0",
2626
"@radix-ui/react-icons": "^1.3.0",
2727
"@radix-ui/react-label": "^2.1.0",
2828
"@radix-ui/react-select": "^2.1.2",

client/src/App.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,21 @@ const App = () => {
357357

358358
const connectMcpServer = async () => {
359359
try {
360-
const client = new Client({
361-
name: "mcp-inspector",
362-
version: "0.0.1",
363-
});
360+
const client = new Client(
361+
{
362+
name: "mcp-inspector",
363+
version: "0.0.1",
364+
},
365+
{
366+
capabilities: {
367+
// Support all client capabilities since we're an inspector tool
368+
sampling: {},
369+
roots: {
370+
listChanged: true,
371+
},
372+
},
373+
},
374+
);
364375

365376
const backendUrl = new URL("http://localhost:3000/sse");
366377

client/src/components/ToolsTab.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ const ToolsTab = ({
4141

4242
if ("content" in toolResult) {
4343
const structuredResult = toolResult as CallToolResult;
44+
const isError = structuredResult.isError ?? false;
4445

4546
return (
4647
<>
4748
<h4 className="font-semibold mb-2">
48-
Tool Result: {structuredResult.isError ? "Error" : "Success"}
49+
Tool Result: {isError ? "Error" : "Success"}
4950
</h4>
5051
{structuredResult.content.map((item, index) => (
5152
<div key={index} className="mb-2">

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"typescript": "^5.6.2"
2929
},
3030
"dependencies": {
31-
"@modelcontextprotocol/sdk": "*",
31+
"@modelcontextprotocol/sdk": "0.5.0",
3232
"cors": "^2.8.5",
3333
"eventsource": "^2.0.2",
3434
"express": "^4.21.0",

0 commit comments

Comments
 (0)