@yglabs/fabric-dataagent
v0.1.0
Published
Wrap a Fabric data agent HTTP MCP server as a local stdio MCP server.
Downloads
78
Maintainers
Readme
fabric-dataagent
Wrap a Fabric data agent HTTP MCP server as a local stdio MCP server.
Quick Start
Run directly with npx:
npx -y @yglabs/fabric-dataagent@latest mcp --url <fabric-dataagent-mcp-url>Global install:
npm install -g @yglabs/fabric-dataagent
fabric-dataagent mcp --url <fabric-dataagent-mcp-url>Prebuilt npm binaries currently ship for:
win-x64win-arm64linux-x64linux-arm64osx-x64osx-arm64
Usage
fabric-dataagent mcp --url <fabric-dataagent-mcp-url> [--account <upn>] [--client-id <guid>]
fabric-dataagent versionOptions:
--url: required upstream HTTP MCP server URL--account: optional MSAL account hint--client-id: optional OAuth client ID, defaults toaebc6443-996d-45c2-90f0-388ff96faa56
Example:
fabric-dataagent mcp --url https://msitapi.fabric.microsoft.com/v1/mcp/workspaces/fd7bfa2c-d5a5-428f-a7b5-bb90e9845986/dataagents/bc1561ce-275f-46dc-996c-fabe50b78521/agentBehavior
- Local transport is stdio MCP.
- Upstream transport is HTTP MCP.
- Requests and notifications are transparently proxied to the upstream server.
initializeis forwarded upstream like any other MCP request.- Each local process proxies one upstream
--url. - To use multiple upstream servers at the same time, run multiple local processes with different
--urlvalues.
MCP Client Configuration
[mcp_servers.fabric_dataagent]
enabled = true
command = "npx"
args = ["-y", "@yglabs/fabric-dataagent@latest", "mcp", "--url", "https://msitapi.fabric.microsoft.com/v1/mcp/workspaces/fd7bfa2c-d5a5-428f-a7b5-bb90e9845986/dataagents/bc1561ce-275f-46dc-996c-fabe50b78521/agent"]Authentication
Authentication follows the @microsoft/workiq MSAL flow closely, with a few intentional local differences:
- OAuth authority and scopes are discovered from the upstream HTTP MCP server challenge and resource metadata.
- Persisted default accounts use
defaultAccount:<hash>keys in~/.fabric-dataagent/.fabric-dataagent.json, scoped byauthority + clientId + scopes. - On Windows, broker parent-window resolution prefers a GUI ancestor process window before falling back to the console root-owner window.
- When
--accountis not provided, the proxy may retryinitializeexactly once with interactive account selection if the first authenticatedinitializefails with an allowlisted auth-related error. On Windows this retry uses broker/WAM withPrompt.SelectAccount; on non-Windows platforms where browser fallback is enabled, it uses browser-based account selection. - Token cache root is
~/.fabric-dataagent.
Development
Build the project:
dotnet build .\src\FabricDataAgent\FabricDataAgent.csprojPublish native binaries into the npm package layout:
npm run publish:npmThe default publish script builds all supported RIDs listed above.
Limit local packaging to a single RID:
npm run publish:npm -- --rids win-x64Verify the npm tarball layout and executable shim:
npm run release:verifyCreate a local tarball:
npm run pack:npmPublish to npm:
npm run publish:registryOverride the staged package name or version during packing or publish:
npm run pack:npm -- --package-name @yglabs/fabric-dataagent --package-version 0.1.0