Skip to content

Commit 5ad2c3c

Browse files
authored
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.
1 parent cfe82c8 commit 5ad2c3c

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

client/src/App.tsx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -575,11 +575,23 @@ const App = () => {
575575
{!serverCapabilities?.resources &&
576576
!serverCapabilities?.prompts &&
577577
!serverCapabilities?.tools ? (
578-
<div className="flex items-center justify-center p-4">
579-
<p className="text-lg text-gray-500">
580-
The connected server does not support any MCP capabilities
581-
</p>
582-
</div>
578+
<>
579+
<div className="flex items-center justify-center p-4">
580+
<p className="text-lg text-gray-500">
581+
The connected server does not support any MCP capabilities
582+
</p>
583+
</div>
584+
<PingTab
585+
onPingClick={() => {
586+
void sendMCPRequest(
587+
{
588+
method: "ping" as const,
589+
},
590+
EmptyResultSchema,
591+
);
592+
}}
593+
/>
594+
</>
583595
) : (
584596
<>
585597
<ResourcesTab

0 commit comments

Comments
 (0)