koan-mcp-integration

Expose Koan entities as MCP tools for Claude Code Mode.

4|3|Updated Aug 18, 2025
One-click install
npx skills add https://github.com/sylin-org/koan-framework --skill koan-mcp-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: koan-mcp-integration
Source: https://github.com/sylin-org/koan-framework/tree/main/.claude/skills/mcp-integration
Command: npx skills add https://github.com/sylin-org/koan-framework --skill koan-mcp-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Integrating custom application logic and data with AI models like Claude often requires complex API wrappers and manual orchestration. This Skill simplifies exposing Koan services as Machine-Code Protocol (MCP) tools, enabling seamless interaction with Claude's Code Mode.

Core Features & Use Cases

  • MCP Server Setup: Easily configure your Koan application to act as an MCP server, ready to receive tool calls from AI.
  • Expose Entities as Tools: Turn your existing Koan entities and business logic into callable AI tools with defined schemas.
  • Code Mode Integration: Leverage Claude's Code Mode to execute your Koan-backed tools, allowing the AI to interact with your application's data and functionality.
  • Use Case: Create an IMcpTool that allows Claude to "get_todo" by ID, enabling the AI to retrieve and provide information about tasks directly from your Koan application.

Quick Start

  1. Add MCP capabilities to your Program.cs: using Koan.Mcp; builder.Services.AddKoan(); builder.Services.AddKoanMcp();
  2. Define an MCP tool for your 'Todo' entity: 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) { var id = args["id"].ToString(); var todo = await Todo.Get(id); return new McpToolResult { Content = todo != null ? $"Todo: {todo.Title}" : "Todo not found" }; } }

Frequently Asked Questions about koan-mcp-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expose my Koan application as an MCP server for Claude integration?

Expose Koan as an MCP server by adding MCP capabilities to your Program.cs with AddKoan() and AddKoanMcp(), then define IMcpTool implementations for each entity you want Claude to access. This enables Claude's Code Mode to call your Koan tools directly.

What's the process for turning Koan entities into callable AI tools?

Create a class implementing IMcpTool with a Name, Description, and McpToolSchema defining parameters. Implement ExecuteAsync to handle tool invocations and return results. Register the tool in your MCP server configuration to make it available to Claude.

Can I use Claude's Code Mode to interact with my Koan application data?

Yes. By exposing Koan entities as MCP tools with defined schemas, Claude's Code Mode can call those tools to retrieve and manipulate your application's data. The MCP protocol handles JSON argument passing and stdio transport between Claude and your Koan server.

What do I need to set up before integrating Koan with Claude via MCP?

You need a Koan application with existing entities or business logic, a C# environment with the Koan.Mcp namespace available, and understanding of schema definitions for tool parameters. MCP server setup requires only configuration in Program.cs and IMcpTool implementations.

Does MCP handle communication between Koan and Claude automatically?

MCP automates the transport layer using stdio and JSON-based argument handling. Once your IMcpTools are registered, MCP manages serialization, parameter passing, and result formatting between Claude and your Koan server without manual orchestration.

What are the limitations when exposing Koan tools through MCP?

Tool execution is bound by timeout and schema constraints defined in McpToolSchema. Complex nested data structures require careful serialization in ExecuteAsync results. MCP's stdio transport depends on process availability and may not suit long-running operations without proper async handling.