-
Notifications
You must be signed in to change notification settings - Fork 288
Description
What
- Allow
dab startto switch the MCP protocol tostdio - Add support for setting the context permissions
role
Note
The default protocol for MCP in DAB is HTTP. Using this command line switch, we can change the protocol to STDIO. This aligns nicely to how local MCP servers are invoked via command line through files like mcp.json in VS Code.
Why
- Local
stdiosupport makes debugging the DAB MCP server easier - With
stdio, developers can run DAB as a local MCP server
A sample VS Code mcp.json file
{
"name": "data-api-builder",
"command": "dab",
"args": [
"start",
"--mcp-stdio",
"role:authenticated",
"--config",
"dab-config.json"
]
}How
Add the --mcp-stdio flag
Example command:
dab start --mcp-stdio role:anonymousImportant
Any value after the role: prefix is used as the permissions role for stdio. The reason for this behavior is because HTTP headers are not part of stdio. Arbitrarily setting the role for the calling user is ONLY supported in DAB when authentication.provider is set to Simulator in the DAB configuration. As a result, using this command line switch will auto-set the authentication.provider to Simulator (in memory) for this session only.
--mcp-stdioswitches the MCP protocol tostdiowhile starting DAB normally- The optional
role:anonymousvalue forces the MCP permissions role - Auto-set
authentication.providertoSimulatorwith this switch.
Behavior
- Without the flag, the MCP server defaults to
http - If no value is provided, the MCP server defaults to the
anonymousrole - REST and GraphQL endpoints are unaffected
httpbehavior of the MCP endpoint is unaffected
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Review In Progress