Xeku.MCP.WebApi 0.0.0.7

dotnet add package Xeku.MCP.WebApi --version 0.0.0.7
                    
NuGet\Install-Package Xeku.MCP.WebApi -Version 0.0.0.7
                    
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="Xeku.MCP.WebApi" Version="0.0.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Xeku.MCP.WebApi" Version="0.0.0.7" />
                    
Directory.Packages.props
<PackageReference Include="Xeku.MCP.WebApi" />
                    
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 Xeku.MCP.WebApi --version 0.0.0.7
                    
#r "nuget: Xeku.MCP.WebApi, 0.0.0.7"
                    
#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 Xeku.MCP.WebApi@0.0.0.7
                    
#: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=Xeku.MCP.WebApi&version=0.0.0.7
                    
Install as a Cake Addin
#tool nuget:?package=Xeku.MCP.WebApi&version=0.0.0.7
                    
Install as a Cake Tool

Xeku.MCP.WebApi

Xeku.MCP.WebApi is the bridge between the Model Context Protocol (MCP) and XAF's Web API. It provides a specialized controller that translates MCP JSON-RPC requests into XAF business logic executions and OData operations.

Features

  • MCP Bridge Controller: Exposes a standard endpoint for MCP clients to interact with XAF.
  • Auto-Discovery Integration: Leverages Xeku.MCP services to expose marked Business Objects as MCP resources and tools.
  • OData Proxy: Automatically forwards Create and Save actions to XAF's native OData engine for maximum compatibility and transaction support.
  • Deep Association Support: Handles complex JSON payloads, mapping them recursively to XPO business objects.

Installation

dotnet add package Xeku.MCP.WebApi

Registration

In your Startup.cs (ASP.NET Core / Web API project):

public void ConfigureServices(IServiceCollection services)
{
    // ... other services
    services.AddXekuMcp(); // Registers discovery services and HttpClient
}

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    // ... other middleware
    app.UseEndpoints(endpoints =>
    {
        endpoints.MapControllers();
    });
}

AI Agent Integration

This module is designed to be consumed by AI Agents (like Claude, ChatGPT, or custom LLM-based tools) through the Model Context Protocol.

Use Cases

  1. Direct Data Manipulation: Agents can create, read, and update XAF business objects using natural language commands translated into MCP tool calls.
  2. Workflow Automation: Trigger custom XAF actions (marked with [McpAction]) to execute complex server-side logic.
  3. Data Analysis: Broaden the context for the AI by exposing relevant Business Objects as resources.

API Integration Guide

The bridge endpoint is typically located at: POST /api/mcp/protocol

AI Agents should be configured to use this endpoint with JSON-RPC 2.0.

Architecture

The diagram below illustrates how the MCP Bridge acts as a translator between external AI requests and the XAF ecosystem.

graph TD
    subgraph "Presentation / UI"
        A["AI Agent (MCP Client)"]:::ui
    end

    subgraph "Service / Logic"
        B["MCP Bridge Controller"]:::logic
        C["Discovery Service"]:::logic
        D["OData Engine (Native XAF)"]:::logic
    end

    subgraph "Data / Entity"
        E["Business Objects (XPO)"]:::data
    end

    A -- "JSON-RPC (tools/call)" --> B
    B -- "List available BOs" --> C
    C -- "Inspect Attributes" --> E
    B -- "Create/Save Proxy" --> D
    D -- "Commit" --> E

    classDef ui fill:#e1f5ff,stroke:#01579b
    classDef logic fill:#fff4e1,stroke:#ff8f00
    classDef data fill:#e8f5e9,stroke:#2e7d32

Best Practices

  • Security: Always ensure the /api/mcp route is protected by appropriate authentication (e.g., JWT, Keycloak, or ApiKey).
  • Stability: Use [McpVisible] and [McpInclude] selectively to expose only necessary data to the AI context.
  • Error Handling: The bridge translates XAF ValidationException into structured MCP error responses, which help agents understand and fix data entry issues.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
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
0.0.0.7 127 1/28/2026
0.0.0.6 108 1/21/2026
0.0.0.5 116 1/15/2026
0.0.0.4 123 1/13/2026