feat(client): Add PingTab when no server capabilities

The TypeScript SDK (and presumably others) quite possibly support at least pings out of the box so including the ping tab even if a server doesn't have capabilities seems to make sense.
This commit is contained in:
Kent C. Dodds
2025-05-01 09:12:29 -06:00
committed by GitHub
parent cfe82c81a1
commit 5ad2c3c146

View File

@@ -575,11 +575,23 @@ const App = () => {
{!serverCapabilities?.resources &&
!serverCapabilities?.prompts &&
!serverCapabilities?.tools ? (
<>
<div className="flex items-center justify-center p-4">
<p className="text-lg text-gray-500">
The connected server does not support any MCP capabilities
</p>
</div>
<PingTab
onPingClick={() => {
void sendMCPRequest(
{
method: "ping" as const,
},
EmptyResultSchema,
);
}}
/>
</>
) : (
<>
<ResourcesTab