You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* refactor: update OAuth flow with FHIR server
This commit merges the existing separate auth flows into single auth flow with FHIR server.
* refactor: update OAuth configuration structure in test cases and remove deprecated tests
* refactor: update env variable naming, modify test cases and update readme
* refactor: update environment variable naming, update readme and fix test cases
* refactor: rename scopes property in ServerConfigs and tests, commented out optional env variables.
- Description: Disables OAuth2-based authentication between the MCP client (e.g., Claude Desktop or VSCode) and the MCP server.
85
-
- Type: Flag (no value required)
86
-
- Default: False (authentication enabled)
87
-
88
-
- **--disable-fhir-auth**
89
-
- Description: Disables OAuth2-based authentication between the MCP server and the FHIR server.
83
+
- **--disable-auth**
84
+
- Description: Disables the security of the MCP Server. Allows you to connect with openly available FHIR servers.
90
85
- Type: Flag (no value required)
91
86
- Default: False (authentication enabled)
92
87
93
88
Sample Usages:
94
89
95
90
```shell
96
-
uv run fhir-mcp-server --transport streamable-http --log-level DEBUG --disable-mcp-auth --disable-fhir-auth
91
+
uv run fhir-mcp-server --transport streamable-http --log-level DEBUG --disable-auth
97
92
```
98
93
99
94
### Environment Variables
100
95
101
96
**MCP Server Configurations:**
102
-
- `HEALTHCARE_MCP_HOST`: The hostname or IP address the MCP server should bind to (e.g., 0.0.0.0 for all interfaces, or localhost for local-only access).
103
-
- `HEALTHCARE_MCP_PORT`: The port on which the MCP server will listen for incoming client requests (e.g., 8000).
104
-
105
-
**MCP Server OAuth2 Configuration (MCP Client ↔ MCP Server):**
106
-
These variables are used when securing communication between an MCP client (like Claude Desktop or VSCode) and the MCP server via OAuth2 Authorization Code Grant flow.
107
-
108
-
- `HEALTHCARE_MCP_OAUTH__CLIENT_ID`: The OAuth2 client ID registered with your Identity Provider to authenticate MCP clients.
109
-
- `HEALTHCARE_MCP_OAUTH__CLIENT_SECRET`: The OAuth2 client secret used to verify the MCP client during the token exchange process.
110
-
- `HEALTHCARE_MCP_OAUTH__METADATA_URL`: The URL to the Identity Provider’s OAuth2 discovery document (usually ending in .well-known/openid-configuration). Used to dynamically fetch token and authorization endpoints.
97
+
- `FHIR_MCP_HOST`: The hostname or IP address the MCP server should bind to (e.g., `localhost`for local-only access, or `0.0.0.0`for all interfaces).
98
+
- `FHIR_MCP_PORT`: The port on which the MCP server will listen for incoming client requests (e.g., `8000`).
111
99
112
-
**FHIR Backend Configuration (MCP Server ↔ FHIR Server):**
113
-
These variables configure the MCP server’s secure connection with the FHIR backend using authorization code grant flow.
100
+
**MCP Server OAuth2 with FHIR server Configuration (MCP Client ↔ MCP Server):**
101
+
These variables configure the MCP client's secure connection to the MCP server, using the OAuth2 authorization code grant flow with a FHIR server.
114
102
115
-
- `HEALTHCARE_MCP_FHIR__CLIENT_ID`: The OAuth2 client ID used by the MCP server to authenticate itself to the FHIR server.
116
-
- `HEALTHCARE_MCP_FHIR__CLIENT_SECRET`: The client secret corresponding to the FHIR client ID. Used during token exchange.
117
-
- `HEALTHCARE_MCP_FHIR__BASE_URL`: The base URL of the FHIR server (e.g., https://hapi.fhir.org/baseR4). This is used to generate tool URIs and to route FHIR requests.
118
-
- `HEALTHCARE_MCP_FHIR__SCOPE`: A space-separated list of OAuth2 scopes to request from the FHIR authorization server (e.g., user/Patient.read user/Observation.read).
103
+
- `FHIR_SERVER_CLIENT_ID`: The OAuth2 client ID used to authorize MCP clients with the FHIR server.
104
+
- `FHIR_SERVER_CLIENT_SECRET`: The client secret corresponding to the FHIR client ID. Used during token exchange.
105
+
- `FHIR_SERVER_BASE_URL`: The base URL of the FHIR server (e.g., `https://hapi.fhir.org/baseR4`). This is used to generate tool URIs and to route FHIR requests.
106
+
- `FHIR_SERVER_SCOPES`: A space-separated list of OAuth2 scopes to request from the FHIR authorization server (e.g., `user/Patient.read user/Observation.read`).
0 commit comments