61 lines
6.3 KiB
Markdown
61 lines
6.3 KiB
Markdown
# Recommend tools during extension installation
|
||
|
||
An extension can offer a connection to its own MCP server when an administrator installs it. The author supplies the server name, address and authentication method in `extension.json`. During installation the administrator can enter a token, select the allowed actions and link the connection to a group. The MCP service must already be running and reachable from the ISA dashboard server.
|
||
|
||
## Choose how to declare the service
|
||
|
||
| Service used by the extension | Manifest item | Who supplies its settings |
|
||
| --- | --- | --- |
|
||
| Your own server implementing MCP over Streamable HTTP | `kind: "customMcp"`, with `name`, `url` and `auth` | The extension supplies the HTTPS endpoint and authentication method. The administrator supplies credentials during setup. |
|
||
| A service in the ISA MCP library, such as PDOK | `kind: "mcp"`, with `catalogId: "pdok"` | ISA supplies the adapter and its setup form. Use this entry for PDOK postcode or address lookups. |
|
||
| An HTTP API published in the operator's API library, such as WeFact | `kind: "api"`, with the published `catalogId` | The dashboard operator supplies the API definition and actions. The administrator selects actions and supplies any API key. |
|
||
|
||
## Add your own server
|
||
|
||
Put the following block in the source `extension.json`. Replace the example address with the exact Streamable HTTP endpoint of your service. The downloadable example is a complete manifest that also offers the PDOK library connection. [Example extension.json](examples/tool-recommendations-v2.json)
|
||
|
||
```json
|
||
{
|
||
"toolRecommendations": {
|
||
"schemaVersion": 2,
|
||
"items": [
|
||
{
|
||
"kind": "customMcp",
|
||
"name": "Materials catalogue",
|
||
"url": "https://mcp.example.org/materials",
|
||
"auth": "bearer",
|
||
"reason": "Looks up product specifications for a selected material."
|
||
}
|
||
]
|
||
}
|
||
}
|
||
```
|
||
|
||
- Use `"auth": "none"` for a service that accepts anonymous requests. With `"auth": "bearer"` the administrator enters a token in ISA Warden, which the dashboard sends to that endpoint as an HTTP bearer credential. Provider-specific OAuth sign-in is available through the corresponding supported library entries.
|
||
- Supply an absolute HTTPS URL, including the MCP path and any required port. The URL may contain up to 4,096 UTF-8 bytes. Keep credentials, query strings, fragments, whitespace and backslashes out of it. Use a `name` of 1–128 UTF-8 bytes and an optional plain-text `reason` of up to 1,024 UTF-8 bytes. Keep tokens, headers and commands out of the package.
|
||
- Schema version 2 accepts all three item kinds in one list of 1–32 recommendations. Version 1 remains valid for `mcp` and `api` catalog items. Each catalog item uses a unique pair of kind and case-sensitive catalog ID. Each custom endpoint can appear once. Hostname case and the default HTTPS port normalize to the same URL. Distinct paths, including a trailing slash after a path, can identify different endpoints.
|
||
|
||
## Package and verify
|
||
|
||
1. Use an `isa-ext` packager and ISA Warden host/dashboard that support the schema you declare. In standalone projects with a bundled packager, update both `tools/isa-ext` and `tools/isa-extension-manifest`, including their Cargo manifests and lockfiles. The `update-skill` command refreshes development instructions separately.
|
||
2. Run the extension's full build, normally `npm run build`. Open **`dist/<id>.isax/extension.json`** and check that `toolRecommendations`, the schema version and the endpoint survived packaging. An older packager can omit an unfamiliar field.
|
||
3. Preview the generated `.isax` directory or its package URL in **Add Extension**. Check the server name, destination, authentication and reason as an administrator would. Package preview reads metadata. The first request to the recommended server starts when the administrator chooses to fetch its tools.
|
||
|
||
## What the administrator does
|
||
|
||
1. In **Recommended tools**, choose **Set up** for the desired service, or continue with the extension and return later through **Edit Extension**. The form identifies a custom endpoint as supplied by the extension and shows the address that will receive the request.
|
||
2. Enter the token if required and choose **Connect and fetch tools**. The dashboard contacts the server using its normal MCP network policy. Select the advertised actions this workspace connection should expose.
|
||
3. Choose the intended group if appropriate and confirm adding the connection. Creating a connection requires workspace tool-management rights. Linking it to a group requires group-link rights. The extension install can also finish with the recommendation skipped.
|
||
4. If the workspace already has a compatible connection, use it. When multiple accounts exist, choose the specific connection for the group. ISA matches custom servers by their canonical endpoint and authentication method. If the dashboard cannot identify an older connection's authentication, review it in **Tools**. A different endpoint or authentication method requires its own review. Credentials stay with the workspace connection. Uninstalling the extension leaves the connection and its existing consumers in place.
|
||
|
||
## Use the connection from the extension
|
||
|
||
Declare `mcp_list_resources` for discovery and `mcp_invoke_tool` for calls in the extension's `permissions`. Discover the server and tool IDs in the active group and use the returned input schema. If several connections offer the same action, let the user select the appropriate account. Handle a missing group connection in the feature that uses it. [External MCP tools](07-host-command-api-reference.md#external-mcp-tools)
|
||
|
||
| Symptom | What to check |
|
||
| --- | --- |
|
||
| The recommendation is missing from the installer | Inspect the generated package-root manifest and the versions of the packager and host. |
|
||
| Fetching tools fails | Check the exact MCP path, dashboard reachability and any required token. The endpoint must speak MCP over Streamable HTTP. For a private deployment the dashboard operator's existing network policy must allow the destination. |
|
||
| The connection exists but the extension cannot find its tool | Verify the current group link, the enabled action names and the extension's bridge permissions. Check the agent link as well when using an agent. |
|
||
| A package update points at a new address | Review the new destination and supply its credentials during setup. Background updates do not register new connections. |
|