apcore-mcp

Expose apcore modules
as MCP tools.

Connect apcore-mcp to your existing executor. MCP clients discover tools from your module registry and invoke them through the execution rules your application already configured.

From MCP client to module
MCP clientstdio / Streamable HTTP
apcore-mcp
tools/listDiscover tool schemas from the registry
tools/callSend arguments to the existing executor
Your apcore application
Registered modulemath.add
  • Publish the module contract

    The adapter reads registered module names, descriptions, schemas, and supported annotations to build the tool list.

  • Reuse configured governance

    Pass your existing executor so tool calls use its validation, access rules, middleware, and approval policy. Configure caller identity for your transport.

  • Choose how clients connect

    Use stdio for a client-launched local process or Streamable HTTP for a network endpoint. Tool Explorer lets you inspect tools in HTTP mode.

Connect an existing Python app

Use Python 3.11+ and an application that already registers modules with an APCore instance. This example starts an MCP server on your own machine.

Read the programmatic guide
  1. Install the adapter

    Run this in your application’s Python environment.

    Install
    python -m pip install apcore-mcp
  2. Start the MCP server

    Save the file as serve_mcp.py. Replace your_app and client with the module and APCore instance used in your application.

    serve_mcp.py
    from apcore_mcp import APCoreMCP
    from your_app import client
    
    mcp = APCoreMCP(client.executor, name="my-app")
    mcp.serve(
        transport="streamable-http",
        host="127.0.0.1",
        port=8765,
        explorer=True,
    )
    Run
    python serve_mcp.py
  3. Discover and call a tool

    Add the endpoint to a Streamable HTTP MCP client.

    Local MCP endpoint
    http://127.0.0.1:8765/mcp/

    If your registry contains math.add, find it with tools/list and invoke it with tools/call.

    math.add({"a":10,"b":5}){"sum":15}

    On the same local server, visit /explorer/ to inspect the tools and their schemas.

Integration documentation

Browse all docs

Detailed capabilities and configuration

Choose a topic

Tool discovery

A client calls tools/list to get tool definitions from the registry. Configure a module ID prefix or tags when the server should expose only part of that registry.