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

# Local MCP server

> Use the optional stdio server with an existing CLI login.

The hosted server is the simplest setup. The local stdio server is an advanced option for users with source-repository access; `@postinger/mcp` is **not published on npm**.

## Build from source

From your repository checkout:

```bash theme={null}
pnpm install --frozen-lockfile
pnpm build:tools
pnpm cli auth login --api-url https://api.dev.postinger.dev
```

Configure your MCP client to start the compiled executable. Replace the paths below with absolute paths on your machine:

```json theme={null}
{
  "mcpServers": {
    "postinger": {
      "command": "node",
      "args": ["/absolute/path/to/postinger/packages/mcp/dist/bin.js"],
      "env": { "POSTINGER_MEDIA_ROOT": "/absolute/path/to/media" }
    }
  }
}
```

The server reads the same user's CLI credentials. If you customized `XDG_CONFIG_HOME`, provide the same value to the MCP process. A desktop client may require an absolute path to Node.js.

## Local files

With `POSTINGER_MEDIA_ROOT`, `upload_media` accepts `filePath` inside that directory. Without the setting, the local upload tool is not registered. Hosted MCP instead accepts `url`.

Restart the MCP connection after changing your login or project. Disconnecting the shared CLI device session invalidates local MCP access too. Remote OAuth connections remain independent.


## Related topics

- [Connect with MCP](/mcp/quickstart.md)
- [Upload media](/guides/media.md)
- [Your first draft](/quickstart.md)
- [CLI authentication](/cli/authentication.md)
- [MCP tool reference](/mcp/tools.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.