fix(platform): align mcp service urls
This commit is contained in:
parent
aea4c4963c
commit
da3129c89b
@ -89,6 +89,7 @@ Production requirements:
|
|||||||
- `COSMOS_ENDPOINT`, `COSMOS_KEY`, and `COSMOS_DATABASE`
|
- `COSMOS_ENDPOINT`, `COSMOS_KEY`, and `COSMOS_DATABASE`
|
||||||
- `FIELD_ENCRYPT_ENABLED=true` with `FIELD_ENCRYPT_KEY_PROVIDER=akv` or a managed key provider and required key material
|
- `FIELD_ENCRYPT_ENABLED=true` with `FIELD_ENCRYPT_KEY_PROVIDER=akv` or a managed key provider and required key material
|
||||||
- `PLATFORM_SERVICE_URL`, `EXTRACTION_SERVICE_URL`, and `MCP_SERVER_URL`
|
- `PLATFORM_SERVICE_URL`, `EXTRACTION_SERVICE_URL`, and `MCP_SERVER_URL`
|
||||||
|
- `NEXT_PUBLIC_MCP_SERVER_URL=http://localhost:4007/api` for local web settings/agent guidance
|
||||||
- `TELEMETRY_ENABLED=true` and `FEATURE_FLAGS_ENABLED=true` when platform services are available
|
- `TELEMETRY_ENABLED=true` and `FEATURE_FLAGS_ENABLED=true` when platform services are available
|
||||||
- `LLM_PROVIDER` plus provider credentials (`OPENAI_API_KEY` or Azure OpenAI settings) for non-mock AI behavior
|
- `LLM_PROVIDER` plus provider credentials (`OPENAI_API_KEY` or Azure OpenAI settings) for non-mock AI behavior
|
||||||
|
|
||||||
|
|||||||
@ -52,6 +52,7 @@ services:
|
|||||||
- NEXT_PUBLIC_NOTES_API_URL=http://backend:4016/api
|
- NEXT_PUBLIC_NOTES_API_URL=http://backend:4016/api
|
||||||
- NEXT_PUBLIC_PLATFORM_SERVICE_URL=${PLATFORM_SERVICE_URL:-http://localhost:4003}/api
|
- NEXT_PUBLIC_PLATFORM_SERVICE_URL=${PLATFORM_SERVICE_URL:-http://localhost:4003}/api
|
||||||
- NEXT_PUBLIC_EXTRACTION_SERVICE_URL=${EXTRACTION_SERVICE_URL:-http://localhost:4005}
|
- NEXT_PUBLIC_EXTRACTION_SERVICE_URL=${EXTRACTION_SERVICE_URL:-http://localhost:4005}
|
||||||
|
- NEXT_PUBLIC_MCP_SERVER_URL=${MCP_SERVER_URL:-http://localhost:4007}/api
|
||||||
- NEXT_PUBLIC_DIAGNOSTICS_URL=${DIAGNOSTICS_URL:-http://localhost:3000}
|
- NEXT_PUBLIC_DIAGNOSTICS_URL=${DIAGNOSTICS_URL:-http://localhost:3000}
|
||||||
- NEXT_PUBLIC_TELEMETRY_TRANSPORT=fetch
|
- NEXT_PUBLIC_TELEMETRY_TRANSPORT=fetch
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@ -32,7 +32,7 @@ This baseline is from repo inspection on May 5, 2026.
|
|||||||
- Mobile still has hardcoded colors in a few screens, especially provider/intake labels and button text. These should move to `NoteLettTheme` or shared token-derived mappings.
|
- Mobile still has hardcoded colors in a few screens, especially provider/intake labels and button text. These should move to `NoteLettTheme` or shared token-derived mappings.
|
||||||
- Backend startup still writes Cosmos init messages through `process.stdout` / `process.stderr`; production paths should use `app.log` or shared logger patterns.
|
- Backend startup still writes Cosmos init messages through `process.stdout` / `process.stderr`; production paths should use `app.log` or shared logger patterns.
|
||||||
- Backend config has development-friendly defaults (`DB_PROVIDER=memory`, default JWT secret, telemetry/flags off). Production must fail closed unless explicitly configured.
|
- Backend config has development-friendly defaults (`DB_PROVIDER=memory`, default JWT secret, telemetry/flags off). Production must fail closed unless explicitly configured.
|
||||||
- Web default MCP URL uses `http://localhost:4050/mcp`, while common platform documents `mcp-server` on port `4007`. Align URL defaults and examples.
|
- Web MCP defaults are aligned by P2.1 to the common-platform `mcp-server` on port `4007`.
|
||||||
- CI currently covers backend and web lint/typecheck/test/build, and mobile typecheck. It should also run mobile tests, web E2E where practical, Docker builds, and shared platform smoke checks.
|
- CI currently covers backend and web lint/typecheck/test/build, and mobile typecheck. It should also run mobile tests, web E2E where practical, Docker builds, and shared platform smoke checks.
|
||||||
- The repo uses many common platform packages already, but production readiness should verify runtime behavior against platform-service, extraction-service, blob, telemetry, diagnostics, flags, kill switch, and MCP rather than only checking dependencies.
|
- The repo uses many common platform packages already, but production readiness should verify runtime behavior against platform-service, extraction-service, blob, telemetry, diagnostics, flags, kill switch, and MCP rather than only checking dependencies.
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ Acceptance criteria:
|
|||||||
|
|
||||||
Goal: prove that NoteLett is using common platform services and packages at runtime, not just declaring dependencies.
|
Goal: prove that NoteLett is using common platform services and packages at runtime, not just declaring dependencies.
|
||||||
|
|
||||||
- [ ] **P2.1** Align MCP URL defaults and examples across `web/src/lib/product-config.ts`, `web/.env.example`, settings copy, Docker env, and docs. Use common platform `mcp-server` port `4007` unless the shared server exposes a different production route. Commit:
|
- [x] **P2.1** Align MCP URL defaults and examples across `web/src/lib/product-config.ts`, `web/.env.example`, settings copy, Docker env, and docs. Use common platform `mcp-server` port `4007` unless the shared server exposes a different production route. Commit: `pending`; Verified: legacy MCP port audit returned no matches outside git history, and `rg "NEXT_PUBLIC_MCP_SERVER_URL|MCP_SERVER_URL" web README.md docker-compose.yml docs/PRODUCTION_READINESS_HANDOFF_ROADMAP.md` shows web default/env/settings/Docker now use `http://localhost:4007/api`, matching common-platform `mcp-server` tool routes.
|
||||||
- [ ] **P2.2** Add or update platform smoke documentation for `platform-service`, `extraction-service`, `mcp-server`, telemetry, diagnostics, flags, kill switch, blob, and NoteLett backend health. Commit:
|
- [ ] **P2.2** Add or update platform smoke documentation for `platform-service`, `extraction-service`, `mcp-server`, telemetry, diagnostics, flags, kill switch, blob, and NoteLett backend health. Commit:
|
||||||
- [ ] **P2.3** Add a local smoke script or extend existing scripts to check `GET /health`, `GET /api/bootstrap`, platform dependencies, and one authenticated product-backend flow in memory mode. Prefer reusing common platform smoke/self-test conventions. Commit:
|
- [ ] **P2.3** Add a local smoke script or extend existing scripts to check `GET /health`, `GET /api/bootstrap`, platform dependencies, and one authenticated product-backend flow in memory mode. Prefer reusing common platform smoke/self-test conventions. Commit:
|
||||||
- [ ] **P2.4** Verify web and mobile shared clients propagate product identity, auth token, and request IDs where supported by common platform clients. Add tests where behavior is local. Commit:
|
- [ ] **P2.4** Verify web and mobile shared clients propagate product identity, auth token, and request IDs where supported by common platform clients. Add tests where behavior is local. Commit:
|
||||||
|
|||||||
@ -6,4 +6,4 @@ NEXT_PUBLIC_EXTRACTION_SERVICE_URL=http://localhost:4005
|
|||||||
NEXT_PUBLIC_DIAGNOSTICS_URL=http://localhost:3000
|
NEXT_PUBLIC_DIAGNOSTICS_URL=http://localhost:3000
|
||||||
NEXT_PUBLIC_TELEMETRY_TRANSPORT=fetch
|
NEXT_PUBLIC_TELEMETRY_TRANSPORT=fetch
|
||||||
NEXT_PUBLIC_WEB_APP_ORIGIN=http://localhost:3000
|
NEXT_PUBLIC_WEB_APP_ORIGIN=http://localhost:3000
|
||||||
NEXT_PUBLIC_MCP_SERVER_URL=http://localhost:4050/mcp
|
NEXT_PUBLIC_MCP_SERVER_URL=http://localhost:4007/api
|
||||||
|
|||||||
@ -120,7 +120,7 @@ export default function SettingsPage() {
|
|||||||
<section className="surface-card" style={{ padding: "var(--nl-space-5)", display: "grid", gap: "var(--nl-space-3)", marginTop: "var(--nl-space-4)" }}>
|
<section className="surface-card" style={{ padding: "var(--nl-space-5)", display: "grid", gap: "var(--nl-space-3)", marginTop: "var(--nl-space-4)" }}>
|
||||||
<strong>Connect your agent (MCP)</strong>
|
<strong>Connect your agent (MCP)</strong>
|
||||||
<p style={{ margin: 0, color: "var(--nl-text-secondary)", fontSize: "var(--nl-fs-sm)" }}>
|
<p style={{ margin: 0, color: "var(--nl-text-secondary)", fontSize: "var(--nl-fs-sm)" }}>
|
||||||
Use your platform access token with the shared MCP server. Point tools at the NoteLett backend and product id{" "}
|
Use your platform access token with the shared MCP server on port 4007. Point tools at the NoteLett backend and product id{" "}
|
||||||
<code>{PRODUCT_ID}</code>.
|
<code>{PRODUCT_ID}</code>.
|
||||||
</p>
|
</p>
|
||||||
<pre
|
<pre
|
||||||
@ -129,7 +129,7 @@ export default function SettingsPage() {
|
|||||||
>
|
>
|
||||||
{`Notes API base: ${NOTES_API_URL}
|
{`Notes API base: ${NOTES_API_URL}
|
||||||
Platform API: ${PLATFORM_SERVICE_URL}
|
Platform API: ${PLATFORM_SERVICE_URL}
|
||||||
MCP server (example): ${MCP_SERVER_URL}
|
MCP API base: ${MCP_SERVER_URL}
|
||||||
|
|
||||||
# Example Cursor / Claude MCP entry (adjust to your installer):
|
# Example Cursor / Claude MCP entry (adjust to your installer):
|
||||||
# "mcpServers": {
|
# "mcpServers": {
|
||||||
|
|||||||
@ -13,7 +13,7 @@ export function getWebAppOrigin(): string {
|
|||||||
if (typeof window !== "undefined") return window.location.origin;
|
if (typeof window !== "undefined") return window.location.origin;
|
||||||
return process.env.NEXT_PUBLIC_WEB_APP_ORIGIN ?? "";
|
return process.env.NEXT_PUBLIC_WEB_APP_ORIGIN ?? "";
|
||||||
}
|
}
|
||||||
export const MCP_SERVER_URL = process.env.NEXT_PUBLIC_MCP_SERVER_URL ?? "http://localhost:4050/mcp";
|
export const MCP_SERVER_URL = process.env.NEXT_PUBLIC_MCP_SERVER_URL ?? "http://localhost:4007/api";
|
||||||
export const EXTRACTION_SERVICE_URL = process.env.NEXT_PUBLIC_EXTRACTION_SERVICE_URL ?? "http://localhost:4005";
|
export const EXTRACTION_SERVICE_URL = process.env.NEXT_PUBLIC_EXTRACTION_SERVICE_URL ?? "http://localhost:4005";
|
||||||
export const DIAGNOSTICS_URL = process.env.NEXT_PUBLIC_DIAGNOSTICS_URL ?? PLATFORM_SERVICE_ORIGIN;
|
export const DIAGNOSTICS_URL = process.env.NEXT_PUBLIC_DIAGNOSTICS_URL ?? PLATFORM_SERVICE_ORIGIN;
|
||||||
export const TELEMETRY_TRANSPORT =
|
export const TELEMETRY_TRANSPORT =
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user