ワンクリックで
koan-mcp-integration
MCP server patterns, Code Mode integration, tool building
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
MCP server patterns, Code Mode integration, tool building
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Auto-registration via KoanAutoRegistrar, minimal Program.cs, "Reference = Intent" pattern
Chat endpoints, embeddings, RAG workflows, vector search
Aggregate boundaries, relationships, lifecycle hooks, value objects
Entity<T> patterns, GUID v7 auto-generation, static methods vs manual repositories
Transparent L1/L2 caching for Entity<T>, [Cacheable] attribute, cross-node coherence, per-request opt-out
Run a mandatory pre-implementation exploration workflow before writing production code in Koan (.NET/C#). Use when a task requires code changes and Codex must first map concerns/layers, read relevant files and docs, check existing constants and types, identify the closest existing pattern, plan exact code placement, and confirm architectural guardrails.
| name | koan-mcp-integration |
| description | MCP server patterns, Code Mode integration, tool building |
Expose Koan services as MCP tools for Claude integration. Use framework patterns for tool implementations.
using Koan.Mcp;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddKoan();
builder.Services.AddKoanMcp(); // Adds MCP capabilities
var app = builder.Build();
app.Run();
public class TodoMcpTool : IMcpTool
{
public string Name => "get_todo";
public string Description => "Retrieve a todo by ID";
public McpToolSchema Schema => new()
{
Parameters = new[]
{
new McpParameter { Name = "id", Type = "string", Required = true }
}
};
public async Task<McpToolResult> ExecuteAsync(
Dictionary<string, object> args,
CancellationToken ct)
{
var id = args["id"].ToString();
var todo = await Todo.Get(id, ct);
return new McpToolResult
{
Content = todo != null
? $"Todo: {todo.Title} (Completed: {todo.Completed})"
: "Todo not found"
};
}
}
{
"Koan": {
"Mcp": {
"ServerName": "Todo MCP Server",
"Version": "1.0.0",
"Transport": "stdio",
"Capabilities": {
"Tools": true,
"Resources": true,
"Prompts": false
}
}
}
}
MCP servers integrate with Claude Code Mode for enhanced capabilities.
docs/guides/mcp-http-sse-howto.mdsamples/S16.PantryPal/MCP/ (MCP server example)src/Koan.Mcp/