Skip to content

Commit df2cb19

Browse files
author
Rob Verkuijlen
committed
fix: mcp-server naar poort 8050 (v1.7.6)
Portainer gebruikt standaard poort 8000 voor zijn edge-agent-tunnel. De mcp-server container luisterde ook op 8000 (alleen de host-mapping was 8001), wat op RHEL9 hosts met Portainer tot verwarring en potentiële conflicten leidde in stack-definities. Zet intern én extern consistent op 8050 (1:1 mapping 8050:8050) zodat de service los staat van Portainer's poortreeks. Alle compose-files, Dockerfile EXPOSE, MCP_PORT env, healthcheck en README bijgewerkt.
1 parent 8ed9b36 commit df2cb19

9 files changed

Lines changed: 18 additions & 18 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,11 @@ De MCP server (`apps/mcp-server/`) stelt de KVK datamirror beschikbaar voor LLMs
207207

208208
### Starten
209209

210-
De MCP server draait automatisch mee met Docker Compose op poort 8001:
210+
De MCP server draait automatisch mee met Docker Compose op poort 8050:
211211

212212
```bash
213213
docker compose -f docker-compose.local.yaml up -d
214-
curl http://localhost:8001/health # {"status": "ok"}
214+
curl http://localhost:8050/health # {"status": "ok"}
215215
```
216216

217217
### Transport
@@ -241,7 +241,7 @@ Voeg toe aan `claude_desktop_config.json` (Settings > Developer > Edit Config):
241241
"command": "C:\\Program Files\\nodejs\\node.exe",
242242
"args": [
243243
"<pad-naar-npm-global>/node_modules/mcp-remote/dist/proxy.js",
244-
"http://localhost:8001/mcp"
244+
"http://localhost:8050/mcp"
245245
]
246246
}
247247
}

apps/mcp-server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ COPY apps/mcp-server ./apps/mcp-server
3333
ENV PATH=/app/.venv/bin:$PATH \
3434
PYTHONPATH=/app/src
3535

36-
EXPOSE 8000
36+
EXPOSE 8050
3737

3838
CMD ["uv", "run", "--no-sync", "python", "apps/mcp-server/main.py"]

apps/mcp-server/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
logger = logging.getLogger(__name__)
2828

2929
_host = os.getenv("MCP_HOST", "0.0.0.0")
30-
_port = int(os.getenv("MCP_PORT", "8000"))
30+
_port = int(os.getenv("MCP_PORT", "8050"))
3131
mcp = FastMCP("kvk-connect", host=_host, port=_port, stateless_http=True)
3232
_service: KVKMirrorService | None = None
3333

docker-compose.db.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,16 @@ services:
106106
- .env.docker
107107
environment:
108108
- MCP_TRANSPORT=streamable-http
109-
- MCP_PORT=8000
109+
- MCP_PORT=8050
110110
ports:
111-
- "8001:8000"
111+
- "8050:8050"
112112
depends_on:
113113
gateway:
114114
condition: service_healthy
115115
networks:
116116
- kvk-network
117117
healthcheck:
118-
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1:8000/health"]
118+
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1:8050/health"]
119119
interval: 10s
120120
timeout: 5s
121121
retries: 5

docker-compose.local.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,16 @@ services:
127127
environment:
128128
- SQLALCHEMY_DATABASE_URI=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
129129
- MCP_TRANSPORT=streamable-http
130-
- MCP_PORT=8000
130+
- MCP_PORT=8050
131131
ports:
132-
- "8001:8000"
132+
- "8050:8050"
133133
depends_on:
134134
postgres:
135135
condition: service_healthy
136136
networks:
137137
- kvk-network
138138
healthcheck:
139-
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1:8000/health"]
139+
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1:8050/health"]
140140
interval: 10s
141141
timeout: 5s
142142
retries: 5

docker-compose.prod.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,17 @@ services:
111111
restart: unless-stopped
112112
environment:
113113
- MCP_TRANSPORT=streamable-http
114-
- MCP_PORT=8000
114+
- MCP_PORT=8050
115115
- SQLALCHEMY_DATABASE_URI=${SQLALCHEMY_DATABASE_URI}
116116
ports:
117-
- "8001:8000"
117+
- "8050:8050"
118118
depends_on:
119119
gateway:
120120
condition: service_healthy
121121
networks:
122122
- kvk-network
123123
healthcheck:
124-
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1:8000/health"]
124+
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1:8050/health"]
125125
interval: 10s
126126
timeout: 5s
127127
retries: 5

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "kvk-connect"
3-
version = "1.7.5"
3+
version = "1.7.6"
44
description = "Client + domain mapping for KVK API"
55
readme = "README.md"
66
requires-python = ">=3.13"

tests/apps/mcp_server/test_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ def test_main_zet_service_instantie(self, db_engine: Engine, monkeypatch: pytest
6666
assert isinstance(main._service, KVKMirrorService)
6767

6868
def test_default_host_en_port(self) -> None:
69-
"""Standaard host is 0.0.0.0 en port 8000veilig in Docker."""
69+
"""Standaard host is 0.0.0.0 en port 8050vermijdt conflict met Portainer edge-agent (8000)."""
7070
import main
7171

7272
assert main._host == os.getenv("MCP_HOST", "0.0.0.0")
73-
assert main._port == int(os.getenv("MCP_PORT", "8000"))
73+
assert main._port == int(os.getenv("MCP_PORT", "8050"))
7474

7575
def test_transport_configureerbaar_via_env(self, db_engine: Engine, monkeypatch: pytest.MonkeyPatch) -> None:
7676
"""MCP_TRANSPORT env var bepaalt transport modus."""

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)