Get the FREE Ultimate OpenClaw Setup Guide →

mcp

MCP Server for Membrane

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio membranehq-mcp-server node dist/index.js

How to use

Membrane MCP Server exposes a set of tools (actions) that integrations can use through the Model Context Protocol. By default, the server operates in static mode and returns all available tools for any connected integration, making it suitable for broad workflows. You can also opt into dynamic mode by requesting /mcp?mode=dynamic, in which case the server will only expose a single tool called enable-tools. You can then use that tool to selectively enable the specific tools needed for the current session. The server supports two transports: Server-Sent Events (SSE) via /sse (deprecated) and Streamable HTTP via /mcp (recommended). To connect, pass your Membrane access token either as a query parameter (?token=...) or in the Authorization header as Bearer <TOKEN>. Once connected, you can inspect available tools, or in dynamic mode, call enable-tools with a list of desired tools to enable them for that session. This approach is especially useful when integrating with an AI agent example to tailor capabilities to user intent.

How to install

Prerequisites:

  • Node.js v18 or higher
  • Git
  • NPM (comes with Node.js)

Installation steps:

  1. Clone the repository: git clone https://github.com/membranehq/mcp-server.git
  2. Navigate to the project directory: cd mcp-server
  3. Install dependencies: npm install
  4. Build the server (if required by the project workflow): npm run build
  5. Run the development server: npm run dev
  6. (Optional) Run tests: npm run start:test npm test

Notes:

  • The README describes a Docker deployment via a Dockerfile, which you can use if you prefer containerized deployment: docker build -t membrane-mcp-server . docker run -p 3000:3000 membrane-mcp-server

Additional notes

Tips and common considerations:

  • Ensure your Membrane access token is valid and issued per the Membrane authentication guide.
  • When using dynamic mode, plan to prompt the model to call enable-tools with the tools you actually need for the session.
  • If you’re debugging, you can reuse the MCP Inspector package (@modelcontextprotocol/inspector) to test and verify tool availability and behavior.
  • For client configuration, you can point clients like Cursor or Claude Desktop to the server’s /sse or /mcp endpoints as shown in the examples.
  • If you encounter transport or streaming issues, verify your network, token scoping, and that the server is reachable at the hosted URL.
  • In chat-session scenarios (experimental), include an x-chat-id header to persist chat sessions across requests.

Related MCP Servers

Sponsor this space

Reach thousands of developers