# or
likec4 mcp --stdio
```

Start MCP server with `http` transport on port `33335` (default) at `./src` folder:

```sh
likec4 mcp --http ./src
```

Start MCP server with `http` transport on port `1234`:

```sh
likec4 mcp -p 1234
```

### Using `@likec4/mcp` package

Example configuration:

```json
{
  "mcpServers": {
    "likec4": {
      "command": "npx",
      "args": [
        "-y",
        "@likec4/mcp"
      ],
      "env": {
        "LIKEC4_WORKSPACE": "${workspaceFolder}"
      }
    }
  }
}
```

This package starts MCP server using [`stdio`](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#stdio) transport.

If `LIKEC4_WORKSPACE` environment variable is not set, the current directory will be used as workspace.

:::tip
You can also use `@likec4/mcp` package as CLI (this package is smaller than `likec4`):

```sh
npm install -g @likec4/mcp