Get the FREE Ultimate OpenClaw Setup Guide →

mcp

MCP server mixin for Moleculer

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio moleculerjs-mcp-server npx -y @moleculer/mcp-server

How to use

This MCP server provides a Moleculer-based MCP (Model Context Protocol) server mixin for the Moleculer API Gateway (moleculer-web). It exposes an MCP-compatible API under the /mcp path of your API Gateway, enabling clients to discover and interact with Moleculer services via a consistent MCP interface. To use it, add the McpServerMixin to your API Gateway service, as demonstrated in the README, and run your gateway. The MCP server is then available at http://localhost:3000/mcp, where clients can access MCP endpoints and capabilities described by the mixin. You can also install MCP client configurations that point to this MCP gateway and use Claude Code integration for command-based MCP interactions. The README shows examples of configuring a client to connect to the MCP gateway and how Claude Code can be wired to communicate with it.

How to install

Prerequisites:

  • Node.js (LTS) and npm installed
  • Basic setup of a Moleculer-based API Gateway project

Install the MCP server package along with moleculer-web (if not already installed):

npm i @moleculer/mcp-server moleculer-web

Usage steps:

  1. Create or update your API Gateway service to include the MCP server mixin:
  • Import ApiGateway from moleculer-web
  • Import { McpServerMixin } from "@moleculer/mcp-server" (or the appropriate path)
  • Add McpServerMixin() to the mixins array of your gateway service
  • Ensure the gateway starts with the MCP server enabled so that the MCP API is served at /mcp
  1. Run your gateway as you would normally (for example, node service or npm start). The MCP server will be exposed at http://localhost:3000/mcp by default.
  2. If you prefer a containerized or alternate launcher, use the package name with your chosen runner (see mcp_config for an npx-based launcher).

Example minimal project setup (snippet):

// api.service.js
import ApiGateway from "moleculer-web";
import { McpServerMixin } from "@moleculer/mcp-server";
export default {
  name: "api",
  mixins: [ApiGateway, McpServerMixin()],
  settings: {
    // other API gateway settings...
  }
};

Then start your gateway and visit http://localhost:3000/mcp to access the MCP interface.

Additional notes

Tips and notes:

  • The MCP server is designed to integrate with Moleculer-based gateways using moleculer-web. Ensure your gateway is reachable at the expected host/port and that CORS and routing allow access to the /mcp endpoint.
  • If you encounter port conflicts, adjust the gateway's listening port in its configuration. The MCP endpoints live under /mcp by default.
  • The README demonstrates how to configure MCP clients and Claude Code integration to connect to this MCP gateway. Use the provided examples as a starting point for your client configs.
  • This server is distributed under the MIT license. Keep dependencies updated to align with Moleculer and moleculer-web compatibility.

Related MCP Servers

Sponsor this space

Reach thousands of developers