mcp-openapi-proxy 0.3.3__tar.gz → 0.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/PKG-INFO +22 -11
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/README.md +20 -9
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy.egg-info/PKG-INFO +22 -11
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy.egg-info/requires.txt +1 -1
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/pyproject.toml +5 -2
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/LICENSE +0 -0
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy/__init__.py +0 -0
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy/handlers.py +0 -0
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy/logging_setup.py +0 -0
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy/openapi.py +0 -0
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy/server_fastmcp.py +0 -0
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy/server_lowlevel.py +0 -0
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy/types.py +0 -0
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy/utils.py +0 -0
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy.egg-info/SOURCES.txt +0 -0
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy.egg-info/dependency_links.txt +0 -0
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy.egg-info/entry_points.txt +0 -0
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy.egg-info/top_level.txt +0 -0
- {mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/setup.cfg +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcp-openapi-proxy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: MCP server for exposing OpenAPI specifications as MCP tools.
|
|
5
5
|
Author-email: Matthew Hand <11550632+matthewhand@users.noreply.github.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
License-File: LICENSE
|
|
9
|
-
Requires-Dist: mcp[cli]
|
|
9
|
+
Requires-Dist: mcp[cli]<2,>=1.2.0
|
|
10
10
|
Requires-Dist: python-dotenv>=1.0.1
|
|
11
11
|
Requires-Dist: requests>=2.25.0
|
|
12
12
|
Requires-Dist: fastapi>=0.100.0
|
|
@@ -170,14 +170,14 @@ The example configurations below were exercised against the live APIs, and the p
|
|
|
170
170
|
| flyio | 34–35 | apps + machine health | `API_KEY` |
|
|
171
171
|
| slack | 7 (exact dot-path whitelist until #27 fix) | `auth.test` + `postMessage` | `API_KEY` |
|
|
172
172
|
| netbox | 9 (whitelist `/ipam/ip-addresses`) | IPAM write + read | `API_KEY` + `API_AUTH_TYPE=Token` |
|
|
173
|
-
| homeassistant |
|
|
173
|
+
| homeassistant | 21 | `get_config` (200) + `call_service` (light.turn_on, 200) | `SERVER_URL_OVERRIDE` + `API_KEY` (`${HA_TOKEN}`, sent as Bearer) |
|
|
174
174
|
|
|
175
175
|
### Client matrix
|
|
176
176
|
|
|
177
177
|
| Agent CLI | Model used (live test) | MCP attach mechanism | Tool calls | Prompts/Resources surfaced to model? |
|
|
178
178
|
|---|---|---|---|---|
|
|
179
179
|
| **opencode** | (CLI default) | `~/.config/opencode/opencode.json` `mcp` | ✅ native | **prompts: ✅ (slash) · resources: ✅** — most complete ‖ |
|
|
180
|
-
| Codex | `gpt-5-codex` (OpenAI API) | `codex exec -c mcp_servers.*` | ✅ native | prompts: ❌ (
|
|
180
|
+
| Codex | `gpt-5-codex` (OpenAI API) | `codex exec -c mcp_servers.*` | ✅ native | prompts: ❌ low-level · ✅ fastmcp (via `call_function`→`get_prompt`) · resources: ✅ (`read_mcp_resource`) ‖ |
|
|
181
181
|
| Kilocode | `kilo-auto/free` | global `settings/mcp_settings.json` | ✅ native | prompts: ❌ (no prompt mechanism) · resources: ✅ (`access_mcp_resource`) ‖ |
|
|
182
182
|
| Qwen | `agent` group via local LiteLLM gateway | project `.qwen/settings.json` | ✅ native (live invoke auth-blocked) | prompts: ✅ (slash `/summarize_spec`) · resources: ❌ (no client support) ‖ |
|
|
183
183
|
| Gemini | Google OAuth free tier (CLI default model) | project `.gemini/settings.json` `mcpServers` | ✅ native | prompts: interactive slash only · resources: interactive `@` only (neither reaches the model headless) ‖ |
|
|
@@ -189,11 +189,17 @@ The example configurations below were exercised against the live APIs, and the p
|
|
|
189
189
|
> resources. **mcp-openapi-proxy serves all three, advertised by default since 0.3.0.**
|
|
190
190
|
> Whether they reach the model is up to the *client*, and that varies:
|
|
191
191
|
>
|
|
192
|
-
> - **‖ re-verified 2026-06-
|
|
193
|
-
> (validating the default-on advertising), driving each **real client binary
|
|
192
|
+
> - **‖ re-verified 2026-06-15 against the published 0.3.3 release** with **no** flags set
|
|
193
|
+
> (validating the default-on advertising), driving each **real client binary**, in
|
|
194
|
+
> **both** server modes (low-level and FastMCP simple). Per-client results were the
|
|
195
|
+
> same across modes except where noted.
|
|
194
196
|
> - **Tools** work on every client tested. **Prompts→model**: opencode & Qwen (slash
|
|
195
197
|
> commands); Gemini interactive-only. **Resources→model**: opencode, Codex, Kilocode.
|
|
196
|
-
> **opencode is the only client that surfaces all three
|
|
198
|
+
> **opencode is the only client that surfaces all three** in any mode.
|
|
199
|
+
> - **FastMCP simple mode exception:** a client with no native prompt surface can still
|
|
200
|
+
> reach prompts through the static `call_function`→`get_prompt` indirection. Observed
|
|
201
|
+
> with **Codex** (prompts ❌ in low-level, ✅ in FastMCP simple mode). Vibe stays
|
|
202
|
+
> tools-only regardless of mode.
|
|
197
203
|
> - **‡ unknown** — Letta can't be exercised without standing up a Letta server + model;
|
|
198
204
|
> left untested rather than guessed.
|
|
199
205
|
> - Every cell on the proxy side was confirmed via a raw stdio handshake (`initialize`
|
|
@@ -939,8 +945,13 @@ Tips: set `IGNORE_SSL_TOOLS=true` only if your host serves a self-signed/mismatc
|
|
|
939
945
|
<details>
|
|
940
946
|
<summary><b>Home Assistant Example</b> — control your smart home; <code>call_service</code> needs the >= 0.3.3 path-param body fix</summary>
|
|
941
947
|
|
|
942
|
-
Exposes a
|
|
943
|
-
`
|
|
948
|
+
Exposes a generic slice of the [Home Assistant REST API](https://developers.home-assistant.io/docs/api/rest/)
|
|
949
|
+
(21 operations) — read state (`get_config`, `list_states`, `get_state`, `list_services`,
|
|
950
|
+
`get_history`/`get_history_now`, `get_logbook`, `list_calendars`, `get_calendar_events`,
|
|
951
|
+
`get_camera_image`, `get_error_log`, `list_components`, `list_events`, `get_api_status`) and
|
|
952
|
+
act (`call_service`, `set_state`, `delete_state`, `fire_event`, `render_template`,
|
|
953
|
+
`check_config`, `handle_intent`). HA ships no official OpenAPI spec, so this is hand-rolled
|
|
954
|
+
from the official docs.
|
|
944
955
|
|
|
945
956
|
#### 1. Verify the OpenAPI specification
|
|
946
957
|
|
|
@@ -959,7 +970,7 @@ curl https://raw.githubusercontent.com/matthewhand/mcp-openapi-proxy/refs/heads/
|
|
|
959
970
|
"env": {
|
|
960
971
|
"OPENAPI_SPEC_URL": "https://raw.githubusercontent.com/matthewhand/mcp-openapi-proxy/refs/heads/main/examples/homeassistant.openapi.json",
|
|
961
972
|
"SERVER_URL_OVERRIDE": "http://homeassistant.local:8123",
|
|
962
|
-
"
|
|
973
|
+
"API_KEY": "${HA_TOKEN}"
|
|
963
974
|
}
|
|
964
975
|
}
|
|
965
976
|
}
|
|
@@ -968,7 +979,7 @@ curl https://raw.githubusercontent.com/matthewhand/mcp-openapi-proxy/refs/heads/
|
|
|
968
979
|
|
|
969
980
|
Key configuration points:
|
|
970
981
|
- `SERVER_URL_OVERRIDE` — your instance base URL, e.g. `http://homeassistant.local:8123` or `http://<ha-host>:8123`.
|
|
971
|
-
- `HA_TOKEN` — a Home Assistant **long-lived access token** (Profile → Long-Lived Access Tokens), passed via `EXTRA_HEADERS
|
|
982
|
+
- `HA_TOKEN` — a Home Assistant **long-lived access token** (Profile → Long-Lived Access Tokens), passed via `API_KEY`; the proxy sends it as `Authorization: Bearer <token>` (its default scheme), so no `EXTRA_HEADERS` needed. Never commit the token; keep it in your environment.
|
|
972
983
|
- `call_service` requires **mcp-openapi-proxy >= 0.3.3**: earlier versions leaked the `{domain}`/`{service}` path params into the JSON body, which Home Assistant rejects with HTTP 400.
|
|
973
984
|
|
|
974
985
|
#### 3. Testing
|
|
@@ -148,14 +148,14 @@ The example configurations below were exercised against the live APIs, and the p
|
|
|
148
148
|
| flyio | 34–35 | apps + machine health | `API_KEY` |
|
|
149
149
|
| slack | 7 (exact dot-path whitelist until #27 fix) | `auth.test` + `postMessage` | `API_KEY` |
|
|
150
150
|
| netbox | 9 (whitelist `/ipam/ip-addresses`) | IPAM write + read | `API_KEY` + `API_AUTH_TYPE=Token` |
|
|
151
|
-
| homeassistant |
|
|
151
|
+
| homeassistant | 21 | `get_config` (200) + `call_service` (light.turn_on, 200) | `SERVER_URL_OVERRIDE` + `API_KEY` (`${HA_TOKEN}`, sent as Bearer) |
|
|
152
152
|
|
|
153
153
|
### Client matrix
|
|
154
154
|
|
|
155
155
|
| Agent CLI | Model used (live test) | MCP attach mechanism | Tool calls | Prompts/Resources surfaced to model? |
|
|
156
156
|
|---|---|---|---|---|
|
|
157
157
|
| **opencode** | (CLI default) | `~/.config/opencode/opencode.json` `mcp` | ✅ native | **prompts: ✅ (slash) · resources: ✅** — most complete ‖ |
|
|
158
|
-
| Codex | `gpt-5-codex` (OpenAI API) | `codex exec -c mcp_servers.*` | ✅ native | prompts: ❌ (
|
|
158
|
+
| Codex | `gpt-5-codex` (OpenAI API) | `codex exec -c mcp_servers.*` | ✅ native | prompts: ❌ low-level · ✅ fastmcp (via `call_function`→`get_prompt`) · resources: ✅ (`read_mcp_resource`) ‖ |
|
|
159
159
|
| Kilocode | `kilo-auto/free` | global `settings/mcp_settings.json` | ✅ native | prompts: ❌ (no prompt mechanism) · resources: ✅ (`access_mcp_resource`) ‖ |
|
|
160
160
|
| Qwen | `agent` group via local LiteLLM gateway | project `.qwen/settings.json` | ✅ native (live invoke auth-blocked) | prompts: ✅ (slash `/summarize_spec`) · resources: ❌ (no client support) ‖ |
|
|
161
161
|
| Gemini | Google OAuth free tier (CLI default model) | project `.gemini/settings.json` `mcpServers` | ✅ native | prompts: interactive slash only · resources: interactive `@` only (neither reaches the model headless) ‖ |
|
|
@@ -167,11 +167,17 @@ The example configurations below were exercised against the live APIs, and the p
|
|
|
167
167
|
> resources. **mcp-openapi-proxy serves all three, advertised by default since 0.3.0.**
|
|
168
168
|
> Whether they reach the model is up to the *client*, and that varies:
|
|
169
169
|
>
|
|
170
|
-
> - **‖ re-verified 2026-06-
|
|
171
|
-
> (validating the default-on advertising), driving each **real client binary
|
|
170
|
+
> - **‖ re-verified 2026-06-15 against the published 0.3.3 release** with **no** flags set
|
|
171
|
+
> (validating the default-on advertising), driving each **real client binary**, in
|
|
172
|
+
> **both** server modes (low-level and FastMCP simple). Per-client results were the
|
|
173
|
+
> same across modes except where noted.
|
|
172
174
|
> - **Tools** work on every client tested. **Prompts→model**: opencode & Qwen (slash
|
|
173
175
|
> commands); Gemini interactive-only. **Resources→model**: opencode, Codex, Kilocode.
|
|
174
|
-
> **opencode is the only client that surfaces all three
|
|
176
|
+
> **opencode is the only client that surfaces all three** in any mode.
|
|
177
|
+
> - **FastMCP simple mode exception:** a client with no native prompt surface can still
|
|
178
|
+
> reach prompts through the static `call_function`→`get_prompt` indirection. Observed
|
|
179
|
+
> with **Codex** (prompts ❌ in low-level, ✅ in FastMCP simple mode). Vibe stays
|
|
180
|
+
> tools-only regardless of mode.
|
|
175
181
|
> - **‡ unknown** — Letta can't be exercised without standing up a Letta server + model;
|
|
176
182
|
> left untested rather than guessed.
|
|
177
183
|
> - Every cell on the proxy side was confirmed via a raw stdio handshake (`initialize`
|
|
@@ -917,8 +923,13 @@ Tips: set `IGNORE_SSL_TOOLS=true` only if your host serves a self-signed/mismatc
|
|
|
917
923
|
<details>
|
|
918
924
|
<summary><b>Home Assistant Example</b> — control your smart home; <code>call_service</code> needs the >= 0.3.3 path-param body fix</summary>
|
|
919
925
|
|
|
920
|
-
Exposes a
|
|
921
|
-
`
|
|
926
|
+
Exposes a generic slice of the [Home Assistant REST API](https://developers.home-assistant.io/docs/api/rest/)
|
|
927
|
+
(21 operations) — read state (`get_config`, `list_states`, `get_state`, `list_services`,
|
|
928
|
+
`get_history`/`get_history_now`, `get_logbook`, `list_calendars`, `get_calendar_events`,
|
|
929
|
+
`get_camera_image`, `get_error_log`, `list_components`, `list_events`, `get_api_status`) and
|
|
930
|
+
act (`call_service`, `set_state`, `delete_state`, `fire_event`, `render_template`,
|
|
931
|
+
`check_config`, `handle_intent`). HA ships no official OpenAPI spec, so this is hand-rolled
|
|
932
|
+
from the official docs.
|
|
922
933
|
|
|
923
934
|
#### 1. Verify the OpenAPI specification
|
|
924
935
|
|
|
@@ -937,7 +948,7 @@ curl https://raw.githubusercontent.com/matthewhand/mcp-openapi-proxy/refs/heads/
|
|
|
937
948
|
"env": {
|
|
938
949
|
"OPENAPI_SPEC_URL": "https://raw.githubusercontent.com/matthewhand/mcp-openapi-proxy/refs/heads/main/examples/homeassistant.openapi.json",
|
|
939
950
|
"SERVER_URL_OVERRIDE": "http://homeassistant.local:8123",
|
|
940
|
-
"
|
|
951
|
+
"API_KEY": "${HA_TOKEN}"
|
|
941
952
|
}
|
|
942
953
|
}
|
|
943
954
|
}
|
|
@@ -946,7 +957,7 @@ curl https://raw.githubusercontent.com/matthewhand/mcp-openapi-proxy/refs/heads/
|
|
|
946
957
|
|
|
947
958
|
Key configuration points:
|
|
948
959
|
- `SERVER_URL_OVERRIDE` — your instance base URL, e.g. `http://homeassistant.local:8123` or `http://<ha-host>:8123`.
|
|
949
|
-
- `HA_TOKEN` — a Home Assistant **long-lived access token** (Profile → Long-Lived Access Tokens), passed via `EXTRA_HEADERS
|
|
960
|
+
- `HA_TOKEN` — a Home Assistant **long-lived access token** (Profile → Long-Lived Access Tokens), passed via `API_KEY`; the proxy sends it as `Authorization: Bearer <token>` (its default scheme), so no `EXTRA_HEADERS` needed. Never commit the token; keep it in your environment.
|
|
950
961
|
- `call_service` requires **mcp-openapi-proxy >= 0.3.3**: earlier versions leaked the `{domain}`/`{service}` path params into the JSON body, which Home Assistant rejects with HTTP 400.
|
|
951
962
|
|
|
952
963
|
#### 3. Testing
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcp-openapi-proxy
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: MCP server for exposing OpenAPI specifications as MCP tools.
|
|
5
5
|
Author-email: Matthew Hand <11550632+matthewhand@users.noreply.github.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
License-File: LICENSE
|
|
9
|
-
Requires-Dist: mcp[cli]
|
|
9
|
+
Requires-Dist: mcp[cli]<2,>=1.2.0
|
|
10
10
|
Requires-Dist: python-dotenv>=1.0.1
|
|
11
11
|
Requires-Dist: requests>=2.25.0
|
|
12
12
|
Requires-Dist: fastapi>=0.100.0
|
|
@@ -170,14 +170,14 @@ The example configurations below were exercised against the live APIs, and the p
|
|
|
170
170
|
| flyio | 34–35 | apps + machine health | `API_KEY` |
|
|
171
171
|
| slack | 7 (exact dot-path whitelist until #27 fix) | `auth.test` + `postMessage` | `API_KEY` |
|
|
172
172
|
| netbox | 9 (whitelist `/ipam/ip-addresses`) | IPAM write + read | `API_KEY` + `API_AUTH_TYPE=Token` |
|
|
173
|
-
| homeassistant |
|
|
173
|
+
| homeassistant | 21 | `get_config` (200) + `call_service` (light.turn_on, 200) | `SERVER_URL_OVERRIDE` + `API_KEY` (`${HA_TOKEN}`, sent as Bearer) |
|
|
174
174
|
|
|
175
175
|
### Client matrix
|
|
176
176
|
|
|
177
177
|
| Agent CLI | Model used (live test) | MCP attach mechanism | Tool calls | Prompts/Resources surfaced to model? |
|
|
178
178
|
|---|---|---|---|---|
|
|
179
179
|
| **opencode** | (CLI default) | `~/.config/opencode/opencode.json` `mcp` | ✅ native | **prompts: ✅ (slash) · resources: ✅** — most complete ‖ |
|
|
180
|
-
| Codex | `gpt-5-codex` (OpenAI API) | `codex exec -c mcp_servers.*` | ✅ native | prompts: ❌ (
|
|
180
|
+
| Codex | `gpt-5-codex` (OpenAI API) | `codex exec -c mcp_servers.*` | ✅ native | prompts: ❌ low-level · ✅ fastmcp (via `call_function`→`get_prompt`) · resources: ✅ (`read_mcp_resource`) ‖ |
|
|
181
181
|
| Kilocode | `kilo-auto/free` | global `settings/mcp_settings.json` | ✅ native | prompts: ❌ (no prompt mechanism) · resources: ✅ (`access_mcp_resource`) ‖ |
|
|
182
182
|
| Qwen | `agent` group via local LiteLLM gateway | project `.qwen/settings.json` | ✅ native (live invoke auth-blocked) | prompts: ✅ (slash `/summarize_spec`) · resources: ❌ (no client support) ‖ |
|
|
183
183
|
| Gemini | Google OAuth free tier (CLI default model) | project `.gemini/settings.json` `mcpServers` | ✅ native | prompts: interactive slash only · resources: interactive `@` only (neither reaches the model headless) ‖ |
|
|
@@ -189,11 +189,17 @@ The example configurations below were exercised against the live APIs, and the p
|
|
|
189
189
|
> resources. **mcp-openapi-proxy serves all three, advertised by default since 0.3.0.**
|
|
190
190
|
> Whether they reach the model is up to the *client*, and that varies:
|
|
191
191
|
>
|
|
192
|
-
> - **‖ re-verified 2026-06-
|
|
193
|
-
> (validating the default-on advertising), driving each **real client binary
|
|
192
|
+
> - **‖ re-verified 2026-06-15 against the published 0.3.3 release** with **no** flags set
|
|
193
|
+
> (validating the default-on advertising), driving each **real client binary**, in
|
|
194
|
+
> **both** server modes (low-level and FastMCP simple). Per-client results were the
|
|
195
|
+
> same across modes except where noted.
|
|
194
196
|
> - **Tools** work on every client tested. **Prompts→model**: opencode & Qwen (slash
|
|
195
197
|
> commands); Gemini interactive-only. **Resources→model**: opencode, Codex, Kilocode.
|
|
196
|
-
> **opencode is the only client that surfaces all three
|
|
198
|
+
> **opencode is the only client that surfaces all three** in any mode.
|
|
199
|
+
> - **FastMCP simple mode exception:** a client with no native prompt surface can still
|
|
200
|
+
> reach prompts through the static `call_function`→`get_prompt` indirection. Observed
|
|
201
|
+
> with **Codex** (prompts ❌ in low-level, ✅ in FastMCP simple mode). Vibe stays
|
|
202
|
+
> tools-only regardless of mode.
|
|
197
203
|
> - **‡ unknown** — Letta can't be exercised without standing up a Letta server + model;
|
|
198
204
|
> left untested rather than guessed.
|
|
199
205
|
> - Every cell on the proxy side was confirmed via a raw stdio handshake (`initialize`
|
|
@@ -939,8 +945,13 @@ Tips: set `IGNORE_SSL_TOOLS=true` only if your host serves a self-signed/mismatc
|
|
|
939
945
|
<details>
|
|
940
946
|
<summary><b>Home Assistant Example</b> — control your smart home; <code>call_service</code> needs the >= 0.3.3 path-param body fix</summary>
|
|
941
947
|
|
|
942
|
-
Exposes a
|
|
943
|
-
`
|
|
948
|
+
Exposes a generic slice of the [Home Assistant REST API](https://developers.home-assistant.io/docs/api/rest/)
|
|
949
|
+
(21 operations) — read state (`get_config`, `list_states`, `get_state`, `list_services`,
|
|
950
|
+
`get_history`/`get_history_now`, `get_logbook`, `list_calendars`, `get_calendar_events`,
|
|
951
|
+
`get_camera_image`, `get_error_log`, `list_components`, `list_events`, `get_api_status`) and
|
|
952
|
+
act (`call_service`, `set_state`, `delete_state`, `fire_event`, `render_template`,
|
|
953
|
+
`check_config`, `handle_intent`). HA ships no official OpenAPI spec, so this is hand-rolled
|
|
954
|
+
from the official docs.
|
|
944
955
|
|
|
945
956
|
#### 1. Verify the OpenAPI specification
|
|
946
957
|
|
|
@@ -959,7 +970,7 @@ curl https://raw.githubusercontent.com/matthewhand/mcp-openapi-proxy/refs/heads/
|
|
|
959
970
|
"env": {
|
|
960
971
|
"OPENAPI_SPEC_URL": "https://raw.githubusercontent.com/matthewhand/mcp-openapi-proxy/refs/heads/main/examples/homeassistant.openapi.json",
|
|
961
972
|
"SERVER_URL_OVERRIDE": "http://homeassistant.local:8123",
|
|
962
|
-
"
|
|
973
|
+
"API_KEY": "${HA_TOKEN}"
|
|
963
974
|
}
|
|
964
975
|
}
|
|
965
976
|
}
|
|
@@ -968,7 +979,7 @@ curl https://raw.githubusercontent.com/matthewhand/mcp-openapi-proxy/refs/heads/
|
|
|
968
979
|
|
|
969
980
|
Key configuration points:
|
|
970
981
|
- `SERVER_URL_OVERRIDE` — your instance base URL, e.g. `http://homeassistant.local:8123` or `http://<ha-host>:8123`.
|
|
971
|
-
- `HA_TOKEN` — a Home Assistant **long-lived access token** (Profile → Long-Lived Access Tokens), passed via `EXTRA_HEADERS
|
|
982
|
+
- `HA_TOKEN` — a Home Assistant **long-lived access token** (Profile → Long-Lived Access Tokens), passed via `API_KEY`; the proxy sends it as `Authorization: Bearer <token>` (its default scheme), so no `EXTRA_HEADERS` needed. Never commit the token; keep it in your environment.
|
|
972
983
|
- `call_service` requires **mcp-openapi-proxy >= 0.3.3**: earlier versions leaked the `{domain}`/`{service}` path params into the JSON body, which Home Assistant rejects with HTTP 400.
|
|
973
984
|
|
|
974
985
|
#### 3. Testing
|
|
@@ -5,14 +5,17 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "mcp-openapi-proxy"
|
|
7
7
|
requires-python = ">=3.10"
|
|
8
|
-
version = "0.3.
|
|
8
|
+
version = "0.3.4"
|
|
9
9
|
description = "MCP server for exposing OpenAPI specifications as MCP tools."
|
|
10
10
|
readme = "README.md"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name = "Matthew Hand", email = "11550632+matthewhand@users.noreply.github.com" }
|
|
13
13
|
]
|
|
14
14
|
dependencies = [
|
|
15
|
-
|
|
15
|
+
# mcp 2.x is a breaking rewrite (FastMCP renamed to MCPServer, Resource.uri type
|
|
16
|
+
# change, etc.) that crashes both server modes at import. Pin to 1.x; see
|
|
17
|
+
# tests/unit/test_mcp_version_pin.py before relaxing this bound.
|
|
18
|
+
"mcp[cli]>=1.2.0,<2",
|
|
16
19
|
"python-dotenv>=1.0.1",
|
|
17
20
|
"requests>=2.25.0",
|
|
18
21
|
"fastapi>=0.100.0", # For OpenAPI parsing utils if used later, and data validation
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{mcp_openapi_proxy-0.3.3 → mcp_openapi_proxy-0.3.4}/mcp_openapi_proxy.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|