Add MCP server for AI agent project management#70
Merged
Conversation
Introduces a Model Context Protocol server (Deckle.MCP) so AI agents can create and manage tabletop game projects programmatically. Key changes: - ApiKey entity + migration: users generate named API keys via the web UI (POST /api-keys) to authenticate MCP clients - Deckle.MCP project: standalone ASP.NET Core service using ModelContextProtocol.AspNetCore 1.3.0 with HTTP/SSE transport - ApiKeyAuthenticationHandler: validates X-API-Key header against hashed keys stored in the database - MCP tools: ProjectTools, ComponentTools, DataSourceTools, FileTools covering project CRUD, all component types, Google Sheets data sources, and file/directory browsing - AppHost updated to register Deckle.MCP as an Aspire service - Fix pre-existing test build failure in UserServiceTests (missing IPasswordHasher<User> constructor argument) https://claude.ai/code/session_01DZn6C8hAmDip6Y8FZFvpcf
Adds an "AI Agent Access" screen at /account/mcp, accessible from the user dropdown menu (below Account Settings). - ApiKeysCard: lists existing API keys with name, created date, last used date, and per-key delete button - CreateApiKeyDialog: two-step flow — enter a name, then reveal the generated key with a one-click copy button and a "won't be shown again" warning - Documentation card explaining how to connect Claude Desktop and other MCP clients (server URL pattern, X-API-Key header, config snippet) - "What agents can do" card listing all 19 MCP tools grouped by category with a note on what is not available via MCP - PlugIcon: new SVG icon for the dropdown entry - apiKeysApi client module and type exports https://claude.ai/code/session_01DZn6C8hAmDip6Y8FZFvpcf
Extract BaseMcpTool with UserId, GetUserId(), and HasProjectAccessAsync() so all four tool classes inherit rather than copy these helpers. Add McpErrors static class for typed error/status JSON strings to eliminate inline string literals across tool methods. https://claude.ai/code/session_01DZn6C8hAmDip6Y8FZFvpcf
Add Dockerfile for the MCP service (mirrors API pattern: sdk:10.0 build, aspnet:10.0 runtime, port 8080). Add mcp service to docker-compose-artifacts so the CI auto-discovers and pushes the image to GHCR. Extend the workflow to build the MCP container, substitute its image variable, and trigger its Railway webhook on master push. https://claude.ai/code/session_01DZn6C8hAmDip6Y8FZFvpcf
Move Railway webhook URLs from inline ${{ secrets.X }} interpolation to
step-level env: variables, preventing secret values from being embedded
in the shell command string before the runner executes it.
https://claude.ai/code/session_01DZn6C8hAmDip6Y8FZFvpcf
…points - Add Deckle.MCP.Tests project (95 tests) covering ProjectTools, ComponentTools, DataSourceTools, FileTools, and ApiKeyAuthenticationHandler - Add ApiKeyEndpointsTests to Deckle.API.Tests covering key generation invariants and user-scoping at the DB level - Expose McpErrors internals to test project via InternalsVisibleTo - Fix ListFileTags to materialise tags before flattening (in-memory EF compatibility) - Switch Add() to await AddAsync() in all *Tools.cs create methods https://claude.ai/code/session_01DZn6C8hAmDip6Y8FZFvpcf
|
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.



Introduces a Model Context Protocol server (Deckle.MCP) so AI agents
can create and manage tabletop game projects programmatically.
Key changes:
(POST /api-keys) to authenticate MCP clients
ModelContextProtocol.AspNetCore 1.3.0 with HTTP/SSE transport
hashed keys stored in the database
covering project CRUD, all component types, Google Sheets data sources,
and file/directory browsing
IPasswordHasher constructor argument)
https://claude.ai/code/session_01DZn6C8hAmDip6Y8FZFvpcf