# .NET MCP API

Source: https://libtmux.org/en/dotnet/latest/mcp/reference/

> Find the .NET server composition API and current MCP protocol catalog.

For MCP client requests, use the [tool reference](../tools/). This page
covers language APIs for embedding or extending the server.

`LibTmux.Mcp` is distributed as a .NET tool package. Installing its
executable does not provide a NuGet library reference for embedding.

## Source API

`McpServerComposition.Add` registers the server in a service collection
and returns the MCP builder for transport composition. It accepts the
connection options, caller pane ID, and a `ServerPolicy` containing wait
and output limits. The public overload selects tools without teardown.
Tool handlers are internal implementation details.

[Composition source](https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux.Mcp/McpServerComposition.cs).

## Protocol API

The [tool reference](../tools/) uses names such as `capture_pane` and
`run_shell_command`. Results provide structured content and bounded text.
Read `tmux://capabilities` for the startup-frozen selection. The current
surface has no workflow prompts or dynamic resource templates.

For the separately published configuration library, see
[Workspace builder API](../../workspace/reference/).

## API declarations

- [LibTmux.Mcp.ActionResult](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-actionresult/)
- [LibTmux.Mcp.BoundedText](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-boundedtext/)
- [LibTmux.Mcp.CaptureResult](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-captureresult/)
- [LibTmux.Mcp.ChannelWaitResult](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-channelwaitresult/)
- [LibTmux.Mcp.EnvironmentEntry](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-environmententry/)
- [LibTmux.Mcp.HookEntry](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-hookentry/)
- [LibTmux.Mcp.KeyStep](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-keystep/)
- [LibTmux.Mcp.LibTmuxMcp](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-libtmuxmcp/)
- [LibTmux.Mcp.MatchedLine](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-matchedline/)
- [LibTmux.Mcp.McpServerComposition](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-mcpservercomposition/)
- [LibTmux.Mcp.OptionEntry](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-optionentry/)
- [LibTmux.Mcp.PaneActivityHub](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-paneactivityhub/)
- [LibTmux.Mcp.PaneInfo](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-paneinfo/)
- [LibTmux.Mcp.PaneInputResult](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-paneinputresult/)
- [LibTmux.Mcp.PaneMatch](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-panematch/)
- [LibTmux.Mcp.PaneSnapshot](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-panesnapshot/)
- [LibTmux.Mcp.RunResult](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-runresult/)
- [LibTmux.Mcp.SearchResult](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-searchresult/)
- [LibTmux.Mcp.ServerInstructions](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-serverinstructions/)
- [LibTmux.Mcp.ServerPolicy](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-serverpolicy/)
- [LibTmux.Mcp.SessionInfo](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-sessioninfo/)
- [LibTmux.Mcp.TailResult](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-tailresult/)
- [LibTmux.Mcp.TmuxConnectionAccessor](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-tmuxconnectionaccessor/)
- [LibTmux.Mcp.TmuxServerInfo](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-tmuxserverinfo/)
- [LibTmux.Mcp.WaitOutcome](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-waitoutcome/)
- [LibTmux.Mcp.WaitResult](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-waitresult/)
- [LibTmux.Mcp.WindowInfo](https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-windowinfo/)

[Protocol catalog](https://libtmux.org/en/dotnet/latest/mcp/tools.json)
