moqui.rest.xml 2.64 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
This software is in the public domain under CC0 1.0 Universal plus a 
Grant of Patent License.

To the extent possible under law, the author(s) have dedicated all
copyright and related and neighboring rights to this software to the
public domain worldwide. This software is distributed without any warranty.

You should have received a copy of the CC0 Public Domain Dedication
along with this software (see the LICENSE.md file). If not, see
<https://creativecommons.org/publicdomain/zero/1.0/>.
-->

<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/rest-api-3.xsd"
        name="mo-mcp" displayName="Moqui MCP Server API" version="${moqui_version}"
        description="Model Context Protocol (MCP) server for Moqui ERP services and entities">

    <!-- MCP JSON-RPC Handler -->
    <resource name="mcp" description="MCP JSON-RPC 2.0 endpoint (MCP 2025-06-18 compliant)">
        <method type="post">
            <service name="McpJsonRpcServices.handleJsonRpcRequest"/>
        </method>
        <method type="get">
            <service name="McpJsonRpcServices.handleHttpGetRequest"/>
        </method>
    </resource>
    
    <!-- Direct MCP Service Access -->
    <resource name="McpServices" description="MCP Services">
        <resource name="mcp" description="MCP Protocol Operations">
            <method type="post">
                <service name="McpServices.mcp#Ping"/>
            </method>
            <method type="post">
                <service name="McpServices.mcp#Initialize"/>
            </method>
            <method type="post">
                <service name="McpServices.mcp#ToolsList"/>
            </method>
            <method type="post">
                <service name="McpServices.mcp#ToolsCall"/>
            </method>
            <method type="post">
                <service name="McpServices.mcp#ResourcesList"/>
            </method>
            <method type="post">
                <service name="McpServices.mcp#ResourcesRead"/>
            </method>
        </resource>
        
        <resource name="discover" description="MCP Discovery Services">
            <method type="post">
                <service name="McpServices.discoverMcpTools"/>
            </method>
            <method type="post">
                <service name="McpServices.discoverMcpResources"/>
            </method>
        </resource>
        
        <resource name="execute" description="MCP Tool Execution">
            <method type="post">
                <service name="McpServices.executeMcpTool"/>
            </method>
        </resource>
    </resource>
</resource>