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