-
Notifications
You must be signed in to change notification settings - Fork 0
Add MCP server configuration and initialization to TUI #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 57 commits
98f74c3
7fd4a0c
4113644
e3bae02
b0bc731
466fa8c
f6e0d89
48f86bc
f57fdc4
6c38689
54cff35
63d9e78
f3f77c8
557c193
42c79ca
f50bbc5
5a65b06
10f257a
14416f4
1c5a414
0bcf771
cb3f774
5b75fad
8218235
e86212a
78e18ed
633019f
7686e55
048700e
1d62f81
caa3b4e
1914f7f
717d907
bd2e9f1
ec686c2
1c69050
c7bcfe7
8288b70
2e6c779
0d62d3a
ece2388
8b2e687
c4aa27a
bfb61b9
fa7787c
42218f1
ae24436
c4925c8
213e08b
1e748bb
7691c31
c0a9f8e
b0bd88c
eef6ede
0dc4416
f52ab47
b4e51ef
5339989
ce2e370
18291c3
f3906fa
06de61b
e1e0496
12b273a
e8334a3
cb50944
82b24b8
4b6ce98
f0f328c
3af1711
9d86769
655825e
8902cc1
8527e85
3f4d998
aac6bb1
3676e7e
bd3d981
ed75dc5
8c7d135
ad394f1
75a4946
af06b33
0e5cb65
e683231
7307d4d
eee5507
bb42e64
1eb87db
557125d
cc904fb
5749a9b
3e5eb20
b30b066
2624fdc
035b979
e33fe90
ccae1e7
851d3aa
1c8f6ea
bd1414c
a0669a2
1043057
18d9c49
904a699
1108110
1605e1f
ac53e5c
699464a
0692a6a
e334d38
a2e41ee
8791b5f
85451cf
cce5574
7204b5e
de434fd
83c0b4c
03cfccb
25780d9
423dea5
006b2dc
91ba105
e39b463
6738562
a8dcb9c
f65c12a
62ea695
a7eddd6
8825eb1
125a5d5
fbe4550
cf31270
dbf4b23
5ca8a77
daddd25
4422681
1b85e34
e9fc3ed
4737c74
7171250
70b418f
bae251b
8fdf4eb
c8d2b2b
6a06fc2
2238a1a
9de87eb
751f051
4d9c51b
2431ff4
338b47a
aefdfbd
893e9d8
ff16f39
ca2a520
d45c8f5
7c16b45
531301c
198787d
f528142
525c78a
11ab71f
355c1af
2cb88ae
c32ff76
50a16b6
e04da3f
6589578
c218d05
7752871
886eeed
4946626
2174460
a4dc181
917e14e
bb01b16
034a6b8
677917d
d3c1718
b61c138
6543732
f967104
53a666a
9f3a26c
29568a1
0f2cf71
00ede6c
53caac6
356eb24
ec21980
b05398c
96975fa
e6642fd
bed3083
f08c009
9bdfd07
7c0330f
f90abdf
dd20d42
1fae348
b5bb2e3
892cd5f
a293ec3
6471db5
554666c
2042654
8038583
64d14d1
91cc999
3c1594a
f2ab2b5
3c06600
d74c2b7
00b8621
9f4f6b6
18a9375
8a8e3ea
3dad8e5
aada3a5
6ab6257
7399d76
5cbdba8
c526dd4
083bdb3
c2dcd59
628fbd2
0c9f80f
43926eb
673813a
c433359
c4fbace
80dbe07
9d584f0
002d938
780834c
e9e2807
614515b
8106a3e
579d71a
2afd20f
ef92cf1
7c16c60
82492c0
26ddbeb
8fb2848
c8b0f8d
315d578
48a7453
408fc0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
description: | ||
globs: | ||
alwaysApply: true | ||
--- | ||
When closing an issue: | ||
|
||
1. Confirm with the user that the issue is ready to be closed. | ||
2. Make sure to run `goimports -w .` and `go fmt ./...` before your commit any code. | ||
3. Run tests by executing the `make test` command in the terminal using `run_terminal_cmd`. | ||
4. **If tests fail:** | ||
* You have to fix the tests. | ||
* DO NOT proceed with closing the issue. | ||
5. **If tests pass:** | ||
* Proceed with committing and pushing the changes, follow the `commit-and-push-workflow`. | ||
* After the `commit-and-push-workflow` is successful, then use the `mcp_github_update_issue` tool to change the state of the issue to 'closed'. Make sure to specify the `owner` as `giantswarm`, `repo` as `envctl`, and the correct `issue_number`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
description: | ||
globs: | ||
alwaysApply: false | ||
--- | ||
When committing and pushing changes after an issue is successfully closed and tests have passed: | ||
|
||
1. **Get current Git branch:** | ||
* Run `git rev-parse --abbrev-ref HEAD` using `run_terminal_cmd` to get the current branch name. Let this be `current_branch`. | ||
2. Let the closed issue number be `issue_num` and its title be `issue_title`. | ||
3. **Branch Management:** | ||
* Set `target_branch` to `current_branch`. | ||
* If `current_branch` is `main` or `master`: | ||
* Generate a new branch name. The suggested pattern is `<type>/issue-<issue_num>-<slugified_issue_title>`, where `<type>` could be `feature`, `fix`, `refactor`, etc., based on the nature of the work. I will generate a slug from the issue title (e.g., lowercase, hyphens for spaces, remove special characters). Example: `refactor/issue-37-getpodnameforportforward-context-handling`. | ||
* Run `git checkout -b <new_branch_name>` using `run_terminal_cmd`. | ||
* Set `target_branch` to this `<new_branch_name>`. | ||
* Inform the user that a new branch `<new_branch_name>` has been created and checked out. | ||
4. **Stage changes:** Run `git add .` using `run_terminal_cmd`. | ||
5. **Commit changes:** | ||
* Construct a commit message. The suggested pattern is: `<CommitType>: <issue_title> (closes #<issue_num>)`. Example: `Refactor: Refactor getPodNameForPortForward for clarity, scope, and context handling (closes #37)`. The `<CommitType>` (e.g., Refactor, Fix, Feat) should match the nature of the work. | ||
* Run `git commit -m "<commit_message>"` using `run_terminal_cmd`. | ||
6. **Push changes:** Run `git push origin <target_branch>` using `run_terminal_cmd`. | ||
7. Inform the user that the changes have been committed to `<target_branch>` and pushed to origin. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
description: | ||
globs: | ||
alwaysApply: true | ||
--- | ||
When creating a new issue: | ||
|
||
1. Gather the necessary information for the issue: `title` and `body`. `labels` and `assignees` can also be included if provided. | ||
2. Use the `create_issue` tool to create the new issue in the `giantswarm/envctl` repository. Set `owner` to `giantswarm` and `repo` to `envctl`. | ||
3. Announce the new issue (title and number) in the chat after it has been created. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
description: | ||
globs: | ||
alwaysApply: true | ||
--- | ||
When beginning work on a new task: | ||
|
||
1. Use the `list_issues` tool to fetch the list of open issues from the `giantswarm/envctl` repository, ordered by issue number descending (newest first). | ||
2. Decide which is the next best issue in that list (still open issue) and use the `get_issue` tool with its issue number to retrieve full details. | ||
3. Summarize that issue (title, number, body, key tasks) in the chat before starting implementation steps. | ||
4. After summarizing, outline the approach for addressing the issue and continue with the implementation. | ||
|
||
This rule ensures every new coding session starts with up-to-date context from the roadmap. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
description: | ||
globs: | ||
alwaysApply: true | ||
--- | ||
## Testing Guidelines | ||
|
||
When implementing new features or fixing bugs, ensure the following testing criteria are met: | ||
To run all tests and linters, use the `make test` command in your terminal. If you changed or added view tests use the terminal to execute 'NO_COLOR=true go test ./internal/tui/view/... -update' so that the view tests have been updated not to use any colors. | ||
|
||
- New functionality must be covered by appropriate unit, integration, or end-to-end tests. | ||
- Existing tests must be updated to reflect any changes in behavior. | ||
- If the changes affect the TUI views: | ||
- Corresponding golden files (located in `internal/tui/view/testdata/*.golden`) must be generated or updated. | ||
- This is typically done by running `go test ./internal/tui/view/... -update`. | ||
- The updated golden files must be carefully reviewed and verified to ensure they reflect the intended visual changes. | ||
- Strive to meet or improve test coverage for the modified packages. There should be a minimum of 80% test coverage. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Project-specific configuration for envctl | ||
# Copy this to .envctl/config.yaml and update with your values | ||
|
||
mcpServers: | ||
- name: grafana | ||
type: localCommand | ||
enabledByDefault: true | ||
icon: "📊" | ||
category: "Monitoring" | ||
command: ["mcp-grafana"] | ||
env: | ||
GRAFANA_URL: "http://localhost:3000" | ||
GRAFANA_API_KEY: "YOUR_GRAFANA_SERVICE_ACCOUNT_TOKEN_HERE" | ||
requiresPortForwards: ["mc-grafana"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Build MCP Server Docker Images | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
paths: | ||
- 'docker/mcp-servers/**' | ||
- '.github/workflows/docker-mcp-servers.yaml' | ||
pull_request: | ||
paths: | ||
- 'docker/mcp-servers/**' | ||
- '.github/workflows/docker-mcp-servers.yaml' | ||
release: | ||
types: [published] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_PREFIX: ${{ github.repository_owner }}/mcp-server | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
server: [kubernetes, prometheus, grafana] | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to GitHub Container Registry | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-${{ matrix.server }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=raw,value=latest,enable={{is_default_branch}} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: docker/mcp-servers/${{ matrix.server }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Test image (if built) | ||
if: github.event_name == 'pull_request' | ||
run: | | ||
docker run --rm ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}-${{ matrix.server }}:pr-${{ github.event.pull_request.number }} --version || echo "No version command available" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
envctl | ||
dist/ | ||
.envctl/config.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Changelog | ||
|
||
## [Unreleased] | ||
|
||
### Added | ||
- Support for containerized MCP servers (#41) | ||
- New `type: container` option for MCP server definitions | ||
- Docker runtime implementation in `internal/containerizer` package | ||
- Container lifecycle management (pull, start, stop, logs, port detection) | ||
- Example Dockerfiles for kubernetes, prometheus, and grafana MCP servers | ||
- GitHub Actions workflow for building and publishing container images | ||
- Documentation for containerized MCP server configuration | ||
|
||
### Changed | ||
- Updated `MCPServerDefinition` to support container-specific fields | ||
- Modified `StartAllMCPServers` to handle both local command and container types | ||
- Enhanced startup logic to initialize container runtime when needed | ||
|
||
## [Previous versions...] |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -9,7 +9,7 @@ It automates the process of logging into clusters via Teleport (`tsh`) and setti | |||||
## Features ✨ | ||||||
|
||||||
* **Simplified Connection:** Connect to management and workload clusters with a single command. | ||||||
* **Automatic Context Switching:** Sets your `kubectl` context correctly. | ||||||
* **Automatic Context Switching:** Sets your Kubernetes context correctly. | ||||||
* **Port-Forwarding Management:** | ||||||
* Prometheus and Grafana services (always from the Management Cluster) | ||||||
* Alloy Metrics (from the Workload Cluster if specified, otherwise from the Management Cluster) | ||||||
|
@@ -31,7 +31,12 @@ Before using `envctl`, ensure you have the following installed and configured: | |||||
|
||||||
1. **Go:** Version 1.21 or later ([Installation Guide](https://go.dev/doc/install)). | ||||||
2. **Teleport Client (`tsh`):** You need `tsh` installed and logged into your Giant Swarm Teleport proxy. | ||||||
3. **`kubectl`:** The Kubernetes command-line tool. | ||||||
3. **`mcp-proxy`:** This tool is used by `envctl` to proxy your actual MCP servers. ([Installation Guide](https://github.com/sparfenyuk/mcp-proxy#installation)). | ||||||
4. **Underlying MCP Server Executables:** `envctl` expects specific MCP server commands to be available in your PATH, as it will invoke them via `mcp-proxy`. These are typically: | ||||||
* For Kubernetes: `npx mcp-server-kubernetes` (requires Node.js and `npx`) | ||||||
* For Prometheus: `uvx mcp-server-prometheus` (requires `uv` and the Python-based `mcp-server-prometheus`) | ||||||
* For Grafana: `uvx mcp-server-grafana` (requires `uv` and the Python-based `mcp-server-grafana` - if you use a Grafana MCP). | ||||||
(Ensure `uv` is installed if you intend to use `uvx` for these servers: [uv Installation](https://github.com/astral-sh/uv#installation)). | ||||||
|
||||||
## Installation 🛠️ | ||||||
|
||||||
|
@@ -90,7 +95,7 @@ envctl self-update | |||||
# Use the CLI mode without TUI (for scripts or CI environments) | ||||||
# This mode will: | ||||||
# - Log into the specified cluster(s) via tsh. | ||||||
# - Set the kubectl context. | ||||||
# - Sets the Kubernetes context. | ||||||
# - Start port-forwarding for: | ||||||
# - Prometheus (MC) on localhost:8080 | ||||||
# - Grafana (MC) on localhost:3000 | ||||||
|
@@ -116,7 +121,7 @@ envctl connect <management-cluster> [workload-cluster-shortname] --no-tui | |||||
|
||||||
* Launches an interactive terminal UI | ||||||
* Logs into `myinstallation` via `tsh kube login myinstallation`. | ||||||
* Sets the current `kubectl` context to `teleport.giantswarm.io-myinstallation`. | ||||||
* Sets the current Kubernetes context to `teleport.giantswarm.io-myinstallation`. | ||||||
* Starts port-forwarding for Prometheus (MC) on `localhost:8080`, Grafana (MC) on `localhost:3000`, and Alloy Metrics (MC) on `localhost:12345`. | ||||||
* Displays cluster health and connection status | ||||||
* Allows management of port-forwards and contexts | ||||||
|
@@ -129,7 +134,7 @@ envctl connect <management-cluster> [workload-cluster-shortname] --no-tui | |||||
|
||||||
* Logs into `myinstallation` via `tsh kube login myinstallation`. | ||||||
* Logs into the *full* workload cluster name (`myinstallation-myworkloadcluster`) via `tsh`. | ||||||
* Sets the current `kubectl` context to the *full* workload cluster name (`teleport.giantswarm.io-myinstallation-myworkloadcluster`). | ||||||
* Sets the current Kubernetes context to the *full* workload cluster name (`teleport.giantswarm.io-myinstallation-myworkloadcluster`). | ||||||
* Starts port-forwarding for Prometheus using the *management cluster* context (`teleport.giantswarm.io-myinstallation`) to `localhost:8080`. | ||||||
* Starts port-forwarding for Grafana using the *management cluster* context (`teleport.giantswarm.io-myinstallation`) to `localhost:3000`. | ||||||
* Starts port-forwarding for Alloy metrics using the *workload cluster* context (`teleport.giantswarm.io-myinstallation-myworkloadcluster`) to `localhost:12345`. | ||||||
|
@@ -153,17 +158,19 @@ When running `envctl connect`, the Terminal User Interface (TUI) provides a visu | |||||
|
||||||
| Key | Action | | ||||||
|--------------|------------------------------------------| | ||||||
| Tab | Navigate to next panel | | ||||||
| Shift+Tab | Navigate to previous panel | | ||||||
| Tab / j / ↓ | Navigate to next panel | | ||||||
| Shift+Tab / k / ↑ | Navigate to previous panel | | ||||||
| q / Ctrl+C | Quit the application | | ||||||
| r | Restart port forwarding for focused panel| | ||||||
| s | Switch Kubernetes context | | ||||||
| N | Start new connection | | ||||||
| h | Toggle help overlay | | ||||||
| L | Toggle log overlay | | ||||||
| C | Toggle MCP config overlay | | ||||||
| D | Toggle dark/light mode | | ||||||
| z | Toggle debug information | | ||||||
| Esc | Close help/log overlay | | ||||||
| y | Copy logs/config (when in overlay) | | ||||||
| Esc | Close help/log/config overlay | | ||||||
|
||||||
For more details on the implementation and architecture of the TUI, see the [TUI documentation](docs/tui.md). | ||||||
|
||||||
|
@@ -201,34 +208,51 @@ Now you can use TAB to complete cluster names: | |||||
envctl connect myinstallation <TAB> # Shows short names of workload clusters for myinstallation | ||||||
``` | ||||||
|
||||||
## Flexible Configuration via YAML ⚙️ | ||||||
|
||||||
`envctl` supports a powerful YAML-based configuration system to customize its behavior, define new MCP servers, and manage port-forwarding rules. This allows you to tailor `envctl` precisely to your development needs. | ||||||
|
||||||
Configurations are loaded in layers (default, user-global, project-specific), with later layers overriding earlier ones. You can manage global settings, define how MCP servers are run (as local commands or containers), and specify detailed port-forwarding rules, including dynamic Kubernetes context targeting (`"mc"`, `"wc"`, or explicit contexts). | ||||||
|
||||||
For a detailed explanation of the configuration file structure, all available options, and comprehensive examples, please see the [**Flexible Configuration Documentation (docs/configuration.md)**](docs/configuration.md). | ||||||
|
||||||
## MCP Integration Notes 💡 | ||||||
|
||||||
* After running `envctl connect`, services should be available at: | ||||||
* Prometheus: `http://localhost:8080/prometheus` (context: Management Cluster) | ||||||
* Grafana: `http://localhost:3000` (context: Management Cluster) | ||||||
* Alloy Metrics: `http://localhost:12345` (context depends on your connection type): | ||||||
* If you specified both a Management Cluster and a Workload Cluster, the Alloy Metrics port-forward uses the Workload Cluster context. | ||||||
* If you specified only a Management Cluster, the Alloy Metrics port-forward uses that Management Cluster context. | ||||||
* Ensure your `mcp.json` (e.g., `~/.cursor/mcp.json`) has the correct `PROMETHEUS_URL` for the Prometheus MCP server: | ||||||
```json | ||||||
{ | ||||||
"mcpServers": { | ||||||
"kubernetes": { | ||||||
"command": "npx", | ||||||
"args": ["mcp-server-kubernetes"] | ||||||
}, | ||||||
"prometheus": { | ||||||
"command": "uv", // Or your specific command | ||||||
"args": [ ... ], // Your specific args | ||||||
"env": { | ||||||
"PROMETHEUS_URL": "http://localhost:8080/prometheus" | ||||||
} | ||||||
} | ||||||
// ... other servers ... | ||||||
} | ||||||
} | ||||||
``` | ||||||
* You may need to **restart your MCP servers** or your IDE after running `envctl connect` for them to pick up the new Kubernetes context and Prometheus connection. | ||||||
* `envctl connect` uses `mcp-proxy` to manage connections for the following predefined MCP services: | ||||||
* **Kubernetes**: Proxied on `http://localhost:8001/sse` (underlying command: `npx mcp-server-kubernetes`) | ||||||
* **Prometheus**: Proxied on `http://localhost:8002/sse` (underlying command: `uvx mcp-server-prometheus`, expects Prometheus port-forward on `localhost:8080` via `PROMETHEUS_URL` env var) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
* **Grafana**: Proxied on `http://localhost:8003/sse` (underlying command: `uvx mcp-server-grafana`, expects Grafana port-forward on `localhost:3000` via `GRAFANA_URL` env var - this is started if you have a Grafana MCP server with this name and command). | ||||||
* `envctl` no longer reads `~/.cursor/mcp.json` to determine how to start these servers. The commands listed above are hardcoded. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes no sense
Suggested change
|
||||||
* You must have `mcp-proxy` installed and the respective underlying MCP server executables (e.g., `mcp-server-kubernetes`, `mcp-server-prometheus`) available in your system's PATH. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
* **IDE Configuration (Cursor/VSCode):** Update your IDE's MCP settings to point to these SSE endpoints: | ||||||
* Kubernetes: `http://localhost:8001/sse` | ||||||
* Prometheus: `http://localhost:8002/sse` | ||||||
* Grafana: `http://localhost:8003/sse` (if you use a Grafana MCP server) | ||||||
* Port-forwarded services (like Prometheus on `localhost:8080` and Grafana on `localhost:3000`) are started by `envctl` as before. The `mcp-proxy` instances for Prometheus and Grafana will use these via environment variables. | ||||||
* You may need to **restart your IDE** after running `envctl connect` and configuring these `mcp-proxy` SSE endpoints for changes to take effect. | ||||||
|
||||||
### Customizing MCP Server Configuration | ||||||
|
||||||
If you need to customize how MCP servers are run, you can use environment variables to override the default configurations: | ||||||
|
||||||
* Each MCP server's configuration can be customized using environment variables with the pattern: | ||||||
* `ENVCTL_MCP_<SERVER>_COMMAND`: Override the command (e.g., `ENVCTL_MCP_PROMETHEUS_COMMAND=uvx`) | ||||||
* `ENVCTL_MCP_<SERVER>_ARGS`: Override the command arguments (e.g., `ENVCTL_MCP_PROMETHEUS_ARGS="mcp-server-prometheus --debug"`) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
* `ENVCTL_MCP_<SERVER>_ENV_<KEY>`: Set an environment variable for the command (e.g., `ENVCTL_MCP_PROMETHEUS_ENV_PROMETHEUS_URL=http://localhost:9090`) | ||||||
|
||||||
For example, to use a custom Prometheus MCP server installation: | ||||||
|
||||||
```bash | ||||||
export ENVCTL_MCP_PROMETHEUS_COMMAND="python3" | ||||||
export ENVCTL_MCP_PROMETHEUS_ARGS="-m custom_prometheus_mcp_server" | ||||||
export ENVCTL_MCP_PROMETHEUS_ENV_PROMETHEUS_URL="http://localhost:9090" | ||||||
export ENVCTL_MCP_PROMETHEUS_ENV_DEBUG="true" | ||||||
|
||||||
# Then run envctl as usual | ||||||
envctl connect myinstallation | ||||||
``` | ||||||
|
||||||
These environment variables will be detected automatically at startup, allowing you to customize the MCP server configurations without modifying the source code. | ||||||
|
||||||
## Future Development 🔮 | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix installation method for prometheus and grafana MCPs