Add and augment conceptual docs (#1375)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mike Kistler <mikekistler@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Halter <halter73@gmail.com>
This commit is contained in:
Jeff Handley 2026-02-24 17:03:27 -08:00 • committed by GitHub
commit 46668f18de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,24 @@
---
title: Ping
author: jeffhandley
description: How to use the MCP ping mechanism to check connection health.
uid: ping
---
## Ping
MCP includes a [ping mechanism] that allows either side of a connection to verify that the other side is still responsive. This is useful for connection health monitoring and keep-alive scenarios.
[ping mechanism]: https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/ping
### Pinging from the client
Use the <xref:ModelContextProtocol.Client.McpClient.PingAsync*> method to verify the server is responsive:
```csharp
await client.PingAsync(cancellationToken: cancellationToken);
```
### Automatic ping handling
Incoming ping requests from either side are responded to automatically. No additional configuration is needed&mdash;when a ping request is received, a ping response is sent immediately.