Aayush Sigdel • 5 days ago
MCP FHIR context: X-FHIR-Server-URL looks like workspace API path, not FHIR R4 base — $everything returns HTML
Hi — I’m integrating a BYO MCP server (LoopGuard Passport) that declares ai.promptopinion/fhir-context and requests patient read scopes.
What I’m doing
MCP URL: https:///mcp (streamable HTTP)
Tool: loopguard.analyze_patient_loops with demo_mode: false
In a patient-scoped session with FHIR context enabled/trusted for the server
What I expect (per docs)
X-FHIR-Server-URL should be a FHIR R4 REST base where this works:
GET {X-FHIR-Server-URL}/Patient/{X-Patient-ID}/$everything
Authorization: Bearer {X-FHIR-Access-Token}
→ application/fhir+json Bundle
What I’m seeing
Headers are present: X-FHIR-Server-URL, X-FHIR-Access-Token, X-Patient-ID
But X-FHIR-Server-URL is shaped like:
https://app.promptopinion.ai/api/workspaces/
That responds with HTML (status 200), not FHIR JSON — so our client can’t parse a Bundle and we fall back to synthetic demo data.
Questions
What is the canonical FHIR base URL MCP tools should use with the access token Po sends (e.g. is it https://app.promptopinion.ai/api/fhir/R4 or something else)?
Is Patient/{id}/$everything supported in the sandbox / Po FHIR proxy for third-party MCP servers?
If workspace URL is intentional, is there documented composition (e.g. append /fhir/R4) or a separate header for the real FHIR base?
Happy to share redacted request metadata (no tokens) if it helps. Thanks!
Log in or sign up for Devpost to join the conversation.

1 comment
Pawan Jindal Manager • 5 days ago
hello Aayush - the FHIR URL that you receive as part of the header should be of the format - https://app.promptopinion.ai/api/workspaces/{id}/fhir. You can check out the FHIR url in your workspace by going to settings->general. Can you share the exact headers that you are receiving in your application on our discord channel? It is much easier to troublehshoot there than going back and forth here.