# tmux MCP for C#

Source: https://libtmux.org/en/csharp/latest/mcp/

> Run LibTmux.Mcp as a .NET tool with bounded results and a selectable tool catalog.

[`LibTmux.Mcp`](<https://libtmux.org/en/csharp/latest/reference/#LibTmux.Mcp>) is a .NET tool package whose executable is
`libtmux-mcp`. It serves tmux tools and a static capability resource over standard
input and output.

The tool targets .NET 8 and .NET 10 and requires a POSIX host with tmux.
Its registered operations include `capture_pane`, `run_shell_command`,
and `capture_since`.

## Toolsets

Use `LIBTMUX_TOOLSETS=inspect` for discovery and terminal reads.
Additional toolsets enable changes, execution, and teardown. The
[tool-selection topic](https://libtmux.org/en/csharp/latest/mcp/topics/tool-selection/) explains exact-name filters,
defaults, and the capability resource. The [complete examples](https://libtmux.org/en/csharp/latest/mcp/examples/)
include project files and cleanup for their owned tmux servers.

[Workspace Manager](https://libtmux.org/en/csharp/latest/workspace/) is the separately packaged
[`LibTmux.Workspace`](<https://libtmux.org/en/csharp/latest/reference/#LibTmux.Workspace>) library. The MCP catalog does not include a workspace-file operation.

[Package contract](https://github.com/libtmux/libtmux-dotnet/blob/ec8b6ab2a4f65e23664f43fba538ba200d4ae8bc/src/LibTmux.Mcp/README.md).

- [Tools](https://libtmux.org/en/csharp/latest/mcp/tools/): Every MCP operation, with its arguments and results.
- [Guides](https://libtmux.org/en/csharp/latest/mcp/guides/): Install the tool, choose a socket, and verify the client's connection.
- [Topics](https://libtmux.org/en/csharp/latest/mcp/topics/): Tool selection, command waits, capture limits, and cancellation.
- [Examples](https://libtmux.org/en/csharp/latest/mcp/examples/): Complete clients for session inspection and bounded command execution.
- [Language API](https://libtmux.org/en/csharp/latest/mcp/reference/): Embedding and implementation types.
