Skip to content

Commit 127064b

Browse files
authored
Releases/202525 (#78)
* 2025 week 25 update * refactor mcp server * adjust for new name
1 parent 9f4d23a commit 127064b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+4548
-1512
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ Temporary Items
3030
# Chart dependencies
3131
**/charts/*.tgz
3232

33+
/.venv/
34+
/.vscode/
35+
/.history/
3336
/docs/recipes/automation/1.3/
3437
/docs/recipes/automation/1.4/
3538
/docs/recipes/automation/gcp/

charts/provisioner-config-local/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ apiVersion: v2
88
name: provisioner-config-local
99
description: Platform Provisioner local config
1010
type: application
11-
version: "1.7.10"
11+
version: "1.7.15"
1212
appVersion: "2.0.1"
1313
home: https://github.com/TIBCOSoftware/tp-helm-charts
1414
maintainers:

charts/provisioner-config-local/recipes/tp-base-on-prem-https.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ helmCharts:
413413
enabled: true
414414
image:
415415
repository: ghcr.io/tibcosoftware/platform-provisioner/platform-provisioner
416-
tag: 1.4.1-auto-on-prem-jammy
416+
tag: 1.4.2-auto-on-prem-jammy
417417
ports:
418418
http:
419419
enabled: true
@@ -429,6 +429,19 @@ helmCharts:
429429
protocol: TCP
430430
containerPort: 8091
431431
servicePort: 8091
432+
env:
433+
- name: K8S_MCP_TRANSPORT
434+
value: "sse" # "streamable-http" or "sse"
435+
- name: K8S_MCP_HTTP_BEARER_TOKEN
436+
value: ""
437+
- name: K8S_MCP_DEBUG
438+
value: "false"
439+
- name: TP_MCP_TRANSPORT
440+
value: "sse" # "streamable-http" or "sse"
441+
- name: TP_MCP_HTTP_BEARER_TOKEN
442+
value: ""
443+
- name: TP_MCP_DEBUG
444+
value: "false"
432445
others:
433446
dnsPolicy: ClusterFirstWithHostNet
434447
# hostNetwork: true
@@ -480,7 +493,7 @@ helmCharts:
480493
version: 1.4.0
481494
condition: ${TP_AUTOMATION_INSTALL}
482495
namespace: ${TP_AUTOMATION_NAMESPACE}
483-
releaseName: mcp-infra-tp
496+
releaseName: mcp-infra-tp-automation
484497
repo:
485498
helm:
486499
url: https://test-server.github.yyzd.me
@@ -495,7 +508,7 @@ helmCharts:
495508
spec:
496509
ingressClassName: ${TP_PROVISIONER_UI_INGRESS_CLASSNAME}
497510
rules:
498-
- host: 'mcp-infra-tp.${TP_DNS_DOMAIN}'
511+
- host: 'mcp-infra-tp-automation.${TP_DNS_DOMAIN}'
499512
http:
500513
paths:
501514
- path: /

charts/provisioner-config-local/recipes/tp-base-on-prem.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ helmCharts:
367367
enabled: true
368368
image:
369369
repository: ghcr.io/tibcosoftware/platform-provisioner/platform-provisioner
370-
tag: 1.4.1-auto-on-prem-jammy
370+
tag: 1.4.2-auto-on-prem-jammy
371371
ports:
372372
http:
373373
enabled: true
@@ -383,6 +383,19 @@ helmCharts:
383383
protocol: TCP
384384
containerPort: 8091
385385
servicePort: 8091
386+
env:
387+
- name: K8S_MCP_TRANSPORT
388+
value: "sse" # "streamable-http" or "sse"
389+
- name: K8S_MCP_HTTP_BEARER_TOKEN
390+
value: ""
391+
- name: K8S_MCP_DEBUG
392+
value: "false"
393+
- name: TP_MCP_TRANSPORT
394+
value: "sse" # "streamable-http" or "sse"
395+
- name: TP_MCP_HTTP_BEARER_TOKEN
396+
value: ""
397+
- name: TP_MCP_DEBUG
398+
value: "false"
386399
others:
387400
dnsPolicy: ClusterFirstWithHostNet
388401
# hostNetwork: true
@@ -434,7 +447,7 @@ helmCharts:
434447
version: 1.4.0
435448
condition: ${TP_AUTOMATION_INSTALL}
436449
namespace: ${TP_AUTOMATION_NAMESPACE}
437-
releaseName: mcp-infra-tp
450+
releaseName: mcp-infra-tp-automation
438451
repo:
439452
helm:
440453
url: https://test-server.github.yyzd.me
@@ -449,7 +462,7 @@ helmCharts:
449462
spec:
450463
ingressClassName: ${TP_PROVISIONER_UI_INGRESS_CLASSNAME}
451464
rules:
452-
- host: 'mcp-infra-tp.${TP_DNS_DOMAIN}'
465+
- host: 'mcp-infra-tp-automation.${TP_DNS_DOMAIN}'
453466
http:
454467
paths:
455468
- path: /

docs/recipes/automation/tp-setup/bootstrap/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## [06/16/2025 23:41]
2+
### Fixed
3+
- Fix the issue that the Set Endpoint visibility dialog cannot be found when setting Endpoint visibility for bwce
4+
- Fix the issue that clicking the provision button does not respond when provisioning flogo/bwce
5+
6+
## [06/13/2025 16:39]
7+
### Fixed
8+
- Fix the issue that the endpoint visibility cannot be set correctly when setting the endpoint visibility of the bw app
9+
- Fix the issue that the dom xpath is incorrect when judging whether the swagger UI title is displayed
10+
111
## [06/12/2025 11:57]
212
### Added
313
- Add tooltips for CP URL and CLI Token input field in One-Click Setup CP UI
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# K8s MCP Server Authentication Setup
2+
3+
K8s MCP Server now supports Bearer Token authentication, similar to the TIBCO Platform MCP Server.
4+
5+
## Configuration
6+
7+
### Environment Variables
8+
9+
Add the following environment variable to enable authentication:
10+
11+
```bash
12+
export K8S_MCP_HTTP_BEARER_TOKEN="your-k8s-secret-token"
13+
```
14+
15+
### Complete Configuration Example
16+
17+
```bash
18+
# Server settings
19+
export K8S_MCP_TRANSPORT="streamable-http"
20+
export K8S_MCP_HOST="0.0.0.0"
21+
export K8S_MCP_PORT="8091"
22+
23+
# Authentication
24+
export K8S_MCP_HTTP_BEARER_TOKEN="k8s-secret-token"
25+
26+
# Debug settings
27+
export K8S_MCP_DEBUG="true"
28+
export K8S_MCP_LOG_REQUESTS="true"
29+
30+
# Start server
31+
./run-mcp-k8s.sh
32+
```
33+
34+
## MCP Inspector Configuration
35+
36+
### For K8s MCP Server
37+
38+
1. **Transport Type**: Streamable HTTP
39+
2. **URL**: `http://localhost:8091/mcp/`
40+
3. **Authentication**:
41+
- Header Name: `Authorization`
42+
- Bearer Token: `k8s-secret-token` (or whatever you set in K8S_MCP_HTTP_BEARER_TOKEN)
43+
44+
### Server Comparison
45+
46+
| Feature | TIBCO Platform MCP | K8s MCP Server |
47+
|----------------|----------------------------|-----------------------------|
48+
| Default Port | 8090 | 8091 |
49+
| Token Variable | `TP_MCP_HTTP_BEARER_TOKEN` | `K8S_MCP_HTTP_BEARER_TOKEN` |
50+
| URL Path | `/mcp/` | `/mcp/` |
51+
| Transport | streamable-http | streamable-http |
52+
53+
## Authentication Behavior
54+
55+
- **Without token**: Server runs without authentication (all requests allowed)
56+
- **With token**: Authentication is enforced for `/mcp` endpoints
57+
- **Health endpoint**: Always accessible without authentication (`/health`)
58+
- **Invalid token**: Returns HTTP 403 Forbidden
59+
- **Missing header**: Returns HTTP 401 Unauthorized
60+
61+
## Testing Authentication
62+
63+
Use the provided test script:
64+
65+
```bash
66+
# Set the token you want to test with
67+
export K8S_MCP_HTTP_BEARER_TOKEN="k8s-test-token"
68+
69+
# Run the test
70+
./debug_k8s_auth.sh
71+
```
72+
73+
## Security Notes
74+
75+
1. **Token Storage**: Store tokens securely (environment variables, secrets management)
76+
2. **HTTPS**: Use HTTPS in production environments
77+
3. **Token Rotation**: Regularly rotate bearer tokens
78+
4. **Logging**: Be careful not to log bearer tokens in debug output
79+
80+
## Troubleshooting
81+
82+
### Common Issues
83+
84+
1. **Connection Refused**: Check if server is running on correct port (8091)
85+
2. **403 Forbidden**: Verify bearer token matches exactly
86+
3. **401 Unauthorized**: Check Authorization header format (`Bearer token`)
87+
4. **Wrong Port**: K8s MCP uses 8091, TP MCP uses 8090
88+
89+
### Debug Commands
90+
91+
```bash
92+
# Check if server is running
93+
curl -v http://localhost:8091/health
94+
95+
# Test without authentication (should work if no token set)
96+
curl -v http://localhost:8091/mcp/
97+
98+
# Test with authentication
99+
curl -v -H "Authorization: Bearer your-token" http://localhost:8091/mcp/
100+
```
101+
102+
## Implementation Details
103+
104+
The authentication is implemented using:
105+
- **Middleware**: `BearerTokenMiddleware` class
106+
- **Scope**: Applied only to `/mcp` paths
107+
- **Method**: Standard HTTP Bearer Token authentication
108+
- **Error Responses**: JSON formatted error messages
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# MCP Servers Environment Variable Configuration
2+
3+
This document describes the environment variables available for configuring the two FastMCP-based servers.
4+
5+
## k8s_mcp_server
6+
7+
The Kubernetes MCP server supports the following environment variables:
8+
9+
### Server Configuration
10+
- `K8S_MCP_HOST`: Host to bind the server to (default: "127.0.0.1")
11+
- `K8S_MCP_PORT`: Port to bind the server to (default: 8091)
12+
- `K8S_MCP_TRANSPORT`: Transport protocol ("stdio", "sse", or "streamable-http", default: "stdio")
13+
14+
### Command Execution Settings
15+
- `K8S_MCP_TIMEOUT`: Custom timeout in seconds (default: 300)
16+
- `K8S_MCP_MAX_OUTPUT`: Maximum output size in characters (default: 100000)
17+
- `K8S_MCP_INIT_TIMEOUT`: Server initialization timeout (default: 30)
18+
- `K8S_MCP_STARTUP_DELAY`: Additional startup delay for streamable-http (default: 2.0)
19+
20+
### Kubernetes Settings
21+
- `K8S_CONTEXT`: Kubernetes context to use (default: current context)
22+
- `K8S_NAMESPACE`: Kubernetes namespace to use (default: "default")
23+
24+
### Security Settings
25+
- `K8S_MCP_SECURITY_MODE`: Security mode for command validation ("strict" or "permissive", default: "strict")
26+
- `K8S_MCP_SECURITY_CONFIG`: Path to YAML config file for security rules (default: None)
27+
28+
## tp_mcp_server
29+
30+
The TIBCO Platform MCP server supports the following environment variables:
31+
32+
### Server Configuration
33+
- `K8S_MCP_SERVER_HOST`: Host to bind the server to (default: "127.0.0.1")
34+
- `K8S_MCP_SERVER_PORT`: Port to bind the server to (default: 8090)
35+
- `K8S_MCP_TRANSPORT`: Transport protocol (default: "streamable-http")
36+
- `K8S_MCP_HTTP_BEARER_TOKEN`: Optional bearer token for HTTP authentication
37+
38+
## Container Deployment
39+
40+
To deploy both servers in containers and bind them to all interfaces (0.0.0.0):
41+
42+
### k8s_mcp_server
43+
```bash
44+
docker run -e K8S_MCP_HOST=0.0.0.0 -e K8S_MCP_PORT=8091 -p 8091:8091 k8s-mcp-server
45+
```
46+
47+
### tp_mcp_server
48+
```bash
49+
docker run -e K8S_MCP_SERVER_HOST=0.0.0.0 -e K8S_MCP_SERVER_PORT=8090 -p 8090:8090 tp-mcp-server
50+
```
51+
52+
## FastMCP Compatibility
53+
54+
Both servers now include:
55+
- Minimal async lifespan functions for streamable-http mode compatibility
56+
- Pre-initialization to avoid async race conditions
57+
- Robust error handling with chunked reading for HTTP requests
58+
- Configurable host/port binding via environment variables
59+
60+
## Error Handling Improvements
61+
62+
The tp_mcp_server includes enhanced error handling in automation_executor.py:
63+
- Chunked reading for large HTTP responses
64+
- Retry logic for urllib requests
65+
- Graceful handling of IncompleteRead errors with partial output recovery

0 commit comments

Comments
 (0)