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

# Connect over stdio

> Run a Redop server over stdio for local MCP host integrations.

Use stdio when the MCP client launches your server as a local command and communicates through stdin and stdout.

## Start the stdio transport

```ts theme={null}
import { Redop } from "@redopjs/redop";

new Redop({
  serverInfo: {
    name: "stdio-server",
    version: "0.1.0",
  },
})
  .tool("ping", {
    handler: () => ({ pong: true }),
  })
  .listen({
    transport: "stdio",
  });
```

## Run it

```sh theme={null}
bun run src/index.ts
```

Your MCP host should launch that command and then talk to the process over stdio.

## Keep stdout clean

Do not write logs to stdout in stdio mode. Stdout is the MCP message channel. Send diagnostic output to stderr instead.

## Use stdio when

* local desktop MCP clients
* editor integrations that launch a command directly
* tools that do not need a long-running network service

## Related pages

* [Verify with local clients](/docs/getting-started/verify-clients)
* [Choose between HTTP and stdio](/docs/guides/choose-transport)
