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
<PackageReference Include="MintPlayer.Spark.Mcp" Version="11.0.1" />
<PackageVersion Include="MintPlayer.Spark.Mcp" Version="11.0.1" />
<PackageReference Include="MintPlayer.Spark.Mcp" />
paket add MintPlayer.Spark.Mcp --version 11.0.1
#r "nuget: MintPlayer.Spark.Mcp, 11.0.1"
#:package MintPlayer.Spark.Mcp@11.0.1
#addin nuget:?package=MintPlayer.Spark.Mcp&version=11.0.1
#tool nuget:?package=MintPlayer.Spark.Mcp&version=11.0.1
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 withMintPlayer.Spark.Authorization; without that package every call runs asanonymous), through the app's embedded authorization server (idp.ForMcp(),MintPlayer.Spark.IdentityProvider), or through an external one (spark.AddExternalAgentAuthorizationServer(...),MintPlayer.Spark.Authorization). Seedocs/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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- MintPlayer.AspNetCore.Endpoints (>= 11.4.1)
- MintPlayer.SourceGenerators.Attributes (>= 13.1.2)
- MintPlayer.Spark (>= 11.1.0)
- MintPlayer.Spark.RavenDB (>= 11.0.0)
- ModelContextProtocol.AspNetCore (>= 2.4.0)
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 |