If the server does not support resource subscriptions, do not show any subscription buttons.
* In App.tsx
- useState for resourceSubscriptions, setResourceSubscriptions a Set of type string.
- in subscribeToResource()
- only make the request to subscribe if the uri is not in the resourceSubscriptions set
- in unsubscribeFromResource()
- only make the request to unsubscribe if the uri is in the resourceSubscriptions set
- in ResourceTab element,
- pass a boolean resourceSubscriptionsSupported as serverCapabilities.resources.subscribe
- pass resourceSubscriptions as a prop
* In ResourcesTab.tsx
- deconstruct resourceSubscriptions and resourceSubscriptionsSupported from props and add prop type
- in selected resource panel
- don't show subscribe or unsubscribe buttons unless resourceSubscriptionsSupported is true
- only show subscribe button if selected resource uri is not in resourceSubscriptions set
- only show unsubscribe button if selected resource uri is in resourceSubscriptions set
- wrap buttons in a flex div that is
- justified right
- has a minimal gap between
- 2/5 wide (just big enough to contain two buttons and leave the h3 text 3/5 of the row to render and not overflow.
50 lines
1.5 KiB
JSON
50 lines
1.5 KiB
JSON
{
|
|
"name": "@modelcontextprotocol/inspector",
|
|
"version": "0.5.1",
|
|
"description": "Model Context Protocol inspector",
|
|
"license": "MIT",
|
|
"author": "Anthropic, PBC (https://anthropic.com)",
|
|
"homepage": "https://modelcontextprotocol.io",
|
|
"bugs": "https://github.com/modelcontextprotocol/inspector/issues",
|
|
"type": "module",
|
|
"bin": {
|
|
"mcp-inspector": "./bin/cli.js"
|
|
},
|
|
"files": [
|
|
"bin",
|
|
"client/bin",
|
|
"client/dist",
|
|
"server/build"
|
|
],
|
|
"workspaces": [
|
|
"client",
|
|
"server"
|
|
],
|
|
"scripts": {
|
|
"dev": "concurrently \"cd client && npm run dev\" \"cd server && npm run dev\"",
|
|
"dev:windows": "concurrently \"cd client && npm run dev\" \"cd server && npm run dev:windows",
|
|
"build-server": "cd server && npm run build",
|
|
"build-client": "cd client && npm run build",
|
|
"build": "npm run build-server && npm run build-client",
|
|
"start-server": "cd server && npm run start",
|
|
"start-client": "cd client && npm run preview",
|
|
"start": "node ./bin/cli.js",
|
|
"prepare": "npm run build",
|
|
"prettier-fix": "prettier --write .",
|
|
"publish-all": "npm publish --workspaces --access public && npm publish --access public"
|
|
},
|
|
"dependencies": {
|
|
"@modelcontextprotocol/inspector-client": "^0.5.1",
|
|
"@modelcontextprotocol/inspector-server": "^0.5.1",
|
|
"concurrently": "^9.0.1",
|
|
"shell-quote": "^1.8.2",
|
|
"spawn-rx": "^5.1.2",
|
|
"ts-node": "^10.9.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.7.5",
|
|
"@types/shell-quote": "^1.7.5",
|
|
"prettier": "3.3.3"
|
|
}
|
|
}
|