HTTP in portable connectors¶
HTTP is an opt-in capability of the existing Connector from umbod_sdk.connectors. A connector without targets declares a version 1 manifest. A connector with a nonempty http_targets mapping declares version 2. A target ID such as slack is a label, not a destination, credential, or permission.
Read the code in this order¶
- Connector declaration and HTTP handlers: the same
Connectordeclares a target and two tools.readusesHttpContext.requestwith a logical target, relative path segments, query pairs, and a response schema.createusesHttpContext.post_status. This fixture exercises the SDK, not a live service. Its configuration check also exercises HTTP in tests; keep managed configuration checks independent of HTTP. Its configuration schema is not directly submittable: managed configuration must be a closed object (additionalPropertiesset to false). - Fake transport and SDK boundary: see how a handler receives a test
HttpContextand how the same connector is exercised in CPython and Monty. The fake supplies HTTP responses without opening sockets. The production SDK reference is Portable HTTP connectors. - POST behavior in tests: the SDK validates the JSON body and reports an unknown outcome if the transport fails. The SDK does not authorize requests.
- Managed submission through administrator MCP: the running-service tests submit an inactive revision, verify that it cannot be published without HTTP configuration, and check that removing HTTP configuration makes it unready without unpublishing it.
Applying this to Slack¶
| Concern | Where it belongs |
|---|---|
Declare slack and describe what it is for |
The SDK's http_targets mapping. No URL or bot token belongs in the source. |
list_users for one configured channel |
An async tool using HttpContext to request Slack's GET /api/conversations.members. The API returns member IDs, not user profiles. Test it against fake responses, including Slack's ok: false response even when the HTTP status is 200. If the channel is configurable, use an ordinary connector configuration field; it is not an access boundary. |
send_message |
A separate async tool. Slack's /api/chat.postMessage is a POST and changes Slack state. Use a bot credential with chat:write and choose the existing Ask tool policy if each send should require confirmation. |
| HTTPS origin and bot credential | In Configuration, the admin enters https://slack.com, chooses Bearer token, and enters the bot token. Umbod attaches the token outside Monty. The author owns the route and query. |
What Umbod supports today¶
Use the administrator MCP guide at umbod://admin/portable-connectors/authoring to create a draft, validate an exact revision offline, and submit it. Submission creates an inactive connector. In the admin workspace, open Configuration to set the HTTPS origin and authentication for each target, then publish and grant access to the intended tools. Umbod supplies these fields automatically for targets declared by the connector. Only admitted public MCP calls can make live GET and JSON POST requests; draft validation and configuration checks remain offline. The connector's configuration check returns ConfigurationCheckResult: invalid results can identify individual configuration fields for correction in the setup wizard. Publishing requires every target to have HTTP configuration. For token rotation and removal, see Operate Umbod.