Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,29 @@ Then, configure your server definition to reference your local clone. For exampl
}
```

### Installation steps using environment variables

Some AI clients allow for accessing environment variables within MCP configurations. In AI clients where this is supported, you can configure your MCP server to read from an environment variable like `MCP_LD_TOKEN` as follows:

```json
{
"mcpServers": {
"launchdarkly": {
"command": "npx",
"args": [
"-y", "--package", "@launchdarkly/mcp-server", "--", "mcp", "start",
"--api-key", "$LD_ACCESS_TOKEN"
],
"env": {
"LD_ACCESS_TOKEN": "MCP_LD_TOKEN"
}
}
}
}
```

This won't work in AI clients (such as Cursor) which don't support accessing environment variables directly within MCP configurations. As a workaround, you can invoke a local script from your MCP configuration. See [here](https://github.com/launchdarkly/mcp-server/issues/26#issuecomment-3064419507) for an example.

<!-- Start Requirements [requirements] -->
## Requirements

Expand Down