> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Hermes

> Connect Corsair to the Hermes agent via MCP, or use the Corsair CLI directly.

<Tabs>
  <Tab title="MCP">
    Use `runStdioMcpServer` to expose Corsair as a local MCP server that Hermes spawns on demand. The Corsair side is identical to every other harness. The only difference is where you register the server in Hermes.

    ## Install

    ```bash theme={null}
    npm install @corsair-dev/mcp
    ```

    ## Create the server script

    ```ts mcp-server.ts theme={null}
    import 'dotenv/config';
    import { runStdioMcpServer } from '@corsair-dev/mcp';
    import { corsair } from './corsair';

    runStdioMcpServer({ corsair }).catch((err) => {
        console.error('[corsair-mcp] Fatal:', err);
        process.exit(1);
    });
    ```

    ## Configure Hermes

    Register the server with Hermes using the standard stdio MCP shape, a `command` and its `args`:

    ```json theme={null}
    {
      "mcpServers": {
        "corsair": {
          "command": "npx",
          "args": ["tsx", "mcp-server.ts"]
        }
      }
    }
    ```

    If your credentials aren't loaded from a `.env` file, add an `env` block with `CORSAIR_KEK`.

    <Note>Register this under Hermes's MCP configuration. Check the Hermes docs for the exact config path, as it differs per version.</Note>

    ## Usage

    Once connected, Hermes can call Corsair tools directly:

    ```
    Setup corsair, then list all Slack channels.
    ```

    Hermes calls `list_operations` to discover available endpoints, `get_schema` to inspect parameters, then `run_script` to execute.
  </Tab>

  <Tab title="CLI">
    <CodeGroup>
      ```bash npm theme={null}
      npm install @corsair-dev/cli
      ```

      ```bash yarn theme={null}
      yarn add @corsair-dev/cli
      ```

      ```bash pnpm theme={null}
      pnpm install @corsair-dev/cli
      ```

      ```bash bun theme={null}
      bun add @corsair-dev/cli
      ```
    </CodeGroup>

    Copy and paste this prompt into Hermes to give it everything it needs to work with Corsair:

    ```
    Run `pnpm corsair` to access Corsair's integrations.
    ```
  </Tab>
</Tabs>
