Table of Contents

Property ServerCapabilities

Namespace
LMKit.Mcp.Client
Assembly
LM-Kit.NET.dll

ServerCapabilities

Gets the capabilities supported by the connected MCP server.

public McpServerCapabilities ServerCapabilities { get; }

Property Value

McpServerCapabilities

A McpServerCapabilities flags enumeration indicating which features the server supports (e.g., Tools, Resources, Prompts, Logging, Completions). Returns None before initialization.

Examples

await client.InitializeAsync();

if (client.ServerCapabilities.HasFlag(McpServerCapabilities.Tools))
{
    var tools = await client.ListToolsAsync();
}

Remarks

Use this property to determine what operations are available on the connected server before attempting to call them. For example, check if Tools is present before calling tool-related methods.

This value is populated automatically during initialization based on the server's response. Use HasCapability(McpServerCapabilities) for a more convenient way to check for specific capabilities.