MintPlayer.Spark.Mcp 11.0.1

dotnet add package MintPlayer.Spark.Mcp --version 11.0.1
                    
NuGet\Install-Package MintPlayer.Spark.Mcp -Version 11.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MintPlayer.Spark.Mcp" Version="11.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MintPlayer.Spark.Mcp" Version="11.0.1" />
                    
Directory.Packages.props
<PackageReference Include="MintPlayer.Spark.Mcp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MintPlayer.Spark.Mcp --version 11.0.1
                    
#r "nuget: MintPlayer.Spark.Mcp, 11.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MintPlayer.Spark.Mcp@11.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MintPlayer.Spark.Mcp&version=11.0.1
                    
Install as a Cake Addin
#tool nuget:?package=MintPlayer.Spark.Mcp&version=11.0.1
                    
Install as a Cake Tool

MintPlayer.Spark.Mcp

A Model Context Protocol server inside a Spark application. AI agents (Claude Code, Codex, Gemini) connect to /mcp and read the application's data as the user who connected them: security.json, row security and attribute redaction apply exactly as in the web UI.

Preview. Agents sign in with personal access tokens (spat_…, created on the account page of an app with MintPlayer.Spark.Authorization; without that package every call runs as anonymous), through the app's embedded authorization server (idp.ForMcp(), MintPlayer.Spark.IdentityProvider), or through an external one (spark.AddExternalAgentAuthorizationServer(...), MintPlayer.Spark.Authorization). See docs/spark_mcp_plan.md.

builder.Services.AddSpark(builder.Configuration, spark =>
{
    spark.AddAuthentication<SparkUser>();
    spark.AddMcp(mcp =>
    {
        mcp.ServerName = "Contracts";
        mcp.ToolPrefix = "contracts";              // contracts_discover, contracts_query, ...
        mcp.Instructions = "Contracts, customers and invoices of the signed-in user.";
        mcp.AgentPermissions = _ => EAgentPermission.Read;
        mcp.AddTools<ContractTools>();              // optional, written unprefixed
    });
});

Nothing is exposed until a type opts in, in its model JSON: "agentPermissions": "Read".

Option Default
ServerName Spark Shown to agents; the tool prefix defaults to its slug.
ToolPrefix slug of ServerName Set it explicitly before publishing: users allow-list tools by name.
Instructions none Sent at initialize.
Authentication All Effective = flags ∩ what is wired; an explicit flag without its wiring fails at startup.
AgentPermissions _ => Read Per call; anonymous callers are clamped to Read.
Path /mcp Spark:Mcp:Path. Startup fails if already mapped.
CanonicalUrl Spark:Auth:PublicBaseUrl + Path Spark:Mcp:CanonicalUrl. The only allowed browser Origin.
RequireSignIn false Every request without a token, initialize included, answers 401.
Quota 120 / 30 per minute Per signed-in user / per anonymous address (Spark:Mcp:Quota).
PlanRetention 365 days Spark:Mcp:PlanRetention. How long applied (and failed) plans are kept as the write audit.

Generic tools: discover, describe, query, get, and the writes propose_changes → apply_changes (signed-in callers with Write; plans in the McpPlans collection, which needs document expiration, enabled by UseSpark()). A plan's saves and deletes commit in one RavenDB transaction or not at all; a custom action is a plan of its own. Your own tools use checked services only (IDatabaseAccess without its …UncheckedAsync methods, IQueryExecutor, IPermissionService; analyzer SPARK050 flags a raw RavenDB session) and answer through SparkMcpResult (Json, Json(note, value), Rows, Text, Untrusted, the uniform Refuse, Invalid for malformed arguments, Track for the audit row count). A tool that reads an unexposed type as part of an exposed one declares [McpReadsThrough(type, through)]; one that runs a custom action on a type agents may only read declares [McpRunsAction(type, action)] and runs it with ISparkMcpActions (the button's gates). mcp.AddPrompts<T>() adds [McpServerPrompt] templates, prefixed like the tools.

Every Spark:Mcp key binds the options; Authentication counts as explicit only when its own key is set (or code assigns it), so a deployment that sets just Spark:Mcp:CanonicalUrl keeps using whatever setups are wired.

The full guide is docs/guide-mcp.md.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.1 103 11/18/2026
11.0.0 91 11/16/2026
11.0.0-preview.117 61 11/12/2026
11.0.0-preview.116 59 11/11/2026
11.0.0-preview.115 60 11/7/2026
11.0.0-preview.114 57 11/7/2026
11.0.0-preview.113 59 11/6/2026
11.0.0-preview.112 60 11/5/2026
11.0.0-preview.111 57 11/5/2026
11.0.0-preview.110 62 11/5/2026
11.0.0-preview.109 56 11/4/2026
11.0.0-preview.108 66 10/30/2026
11.0.0-preview.107 63 10/24/2026
11.0.0-preview.106 69 10/24/2026
11.0.0-preview.105 79 10/14/2026
11.0.0-preview.104 66 10/12/2026