The Admin Panel is the operator control plane for hs-sql-agent. Operators define what an MCP client can reach and how SQL is governed; MCP clients then use the separately authenticated /mcp endpoint.
Identity, governance, and operations
Recommended operator flow
- Register and verify the database connection that the agent should expose.
- Issue an MCP key bound to that database and give it only the tools/tables the client needs.
- Add semantic metadata when raw schema names are not enough for reliable agent discovery.
- Generate the client configuration and connect through the public Streamable HTTP
/mcpendpoint. - Use audit and operability surfaces to inspect runtime behavior and tighten policy where needed.
MCP key lifecycle
When a key is issued, rotated, or duplicated, the UI can generate direct Streamable HTTP configuration for supported client formats. The plaintext secret is shown only in that lifecycle dialog and is not retained for later display.
Copy the generated configuration before closing the dialog.
Embedded UI and built-in identity are optional
An ASP.NET Core host can expose the HsSqlAgent Admin API without serving the packaged Admin UI. In the modular integration path, use UseHsSqlAgentAdminApi() and let the host call MapControllers(); add UseHsSqlAgentAdminUi() only when the packaged UI is wanted.
The host can also use AddHsSqlAgentHostAuthorization(...) to keep its existing login and permission system instead of installing HsSqlAgent members, roles, JWT, SMTP, or OIDC. MCP is selected and mapped independently with AddHsSqlAgentMcp(...) / UseHsSqlAgentMcp().
See ASP.NET Core integration for the complete 2.0.2 composition model.