Add StackQL embedded MCP library, Agent Framework connector, driftwat…#1
Merged
Conversation
…ch sample, and CI
Library core (StackQL.Mcp):
- StackqlMcp.CreateBuilder() fluent builder with WithMode/WithAuth/WithBinary/
WithBundlePath/WithApproot/WithCommand/StartAsync, idiomatic async + IAsyncDisposable
- StackqlMode enum (ReadOnly default; Safe/DeleteSafe/FullAccess explicit opt-in)
- Canonical cwd-independent launch args (mcp --mcp.server.type=stdio --approot
<abs> --mcp.config {...}); audit disabled, read_only default
- Two acquisition modes: sidecar (download .mcpb, verify sha256 against embedded
pins, extract to the shared ~/.stackql/mcp-server-bin/<ver>/<key>/ cache) and
vendored (embed the bundle for single-file self-contained publish)
- STACKQL_MCP_BIN / STACKQL_MCP_BUNDLE overrides; zip-slip guarded extraction;
StackqlServer.ResolveCommandAsync for harnesses that own the process
- Built on the official C# MCP SDK (ModelContextProtocol.Core 1.4.0); no other
third-party deps
Agent Framework connector (StackQL.Mcp.AgentFramework, separate package):
- AsAgentToolsAsync() returns the StackQL tools as Microsoft.Extensions.AI
AITool instances (McpClientTool : AIFunction : AITool), ready for an AIAgent's
tools array. Core lib stays free of any Agent Framework dependency.
Sample (samples/driftwatch): Worker Service that embeds the read_only server,
runs a SQL drift suite on a schedule, and posts a Teams Adaptive Card with the
SQL behind each finding. Runs against the github null_auth fixture credential-free;
set up for single-file vendored publish.
Tests: 16 unit tests (launch-arg shape, mode wire values, pin parse, cache path,
platform key) plus the family conformance check (initialize -> tools/list ->
pull github -> list_services), skippable when no binary is present and verified
green locally against the real v0.10.500 bundle.
CI: GitHub Actions on PR + merge to main - dotnet format gate, 3-OS build/test
matrix (downloads the platform bundle to activate conformance), pack validation;
separate tag-driven manual NuGet publish workflow. Deterministic builds,
Source Link, embedded PDBs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ch sample, and CI
Library core (StackQL.Mcp):
Agent Framework connector (StackQL.Mcp.AgentFramework, separate package):
Sample (samples/driftwatch): Worker Service that embeds the read_only server, runs a SQL drift suite on a schedule, and posts a Teams Adaptive Card with the SQL behind each finding. Runs against the github null_auth fixture credential-free; set up for single-file vendored publish.
Tests: 16 unit tests (launch-arg shape, mode wire values, pin parse, cache path, platform key) plus the family conformance check (initialize -> tools/list -> pull github -> list_services), skippable when no binary is present and verified green locally against the real v0.10.500 bundle.
CI: GitHub Actions on PR + merge to main - dotnet format gate, 3-OS build/test matrix (downloads the platform bundle to activate conformance), pack validation; separate tag-driven manual NuGet publish workflow. Deterministic builds, Source Link, embedded PDBs.