# API Reference

> API reference for @anymux/mcp.

Source: https://anymux-docs.n.yatsyk.com/docs/mcp/api

# API Reference

## `createMcpServer`

Creates an MCP server that exposes file system operations as tools.

### Usage

```ts
createMcpServer(options: McpServerOptions)
```

### Options

| Option | Type          | Description                        |
| ------ | ------------- | ---------------------------------- |
| `fs`   | `IFileSystem` | The file system to expose          |
| `name` | `string?`     | Server name (default: "anymux-fs") |

### Exposed MCP Tools

| Tool             | Description                    |
| ---------------- | ------------------------------ |
| `read_file`      | Read file contents             |
| `write_file`     | Write content to a file        |
| `list_directory` | List directory entries         |
| `stat`           | Get file or directory metadata |
| `mkdir`          | Create a directory             |
| `rm`             | Remove a file or directory     |
