Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
MCP server for Membrane integrations
This repository provides an MCP server that exposes actions from connected Membrane apps as tools an agent can call. It works over streamable HTTP at `/mcp` and also supports deprecated SSE at `/sse`, with optional tool filtering and chat session tracking.
Builders who want their agent to call Membrane-connected tools from Cursor, Claude, or another MCP client.
You can let your agent access Membrane integrations without building a custom connector for each client.
What it does
Streamable HTTP transport
Serves MCP over `/mcp`, which the README calls the recommended transport.
Deprecated SSE transport
Also serves `/sse` for older clients that still use server-sent events.
Token authentication
Accepts a Membrane access token through `?token=` or an `Authorization: Bearer` header.
Static and dynamic tool modes
Static mode returns all tools; dynamic mode exposes only `enable-tools` so the session can enable a smaller set of tools.
App-specific tool filtering
Lets you request tools for specific integrations with the `apps` query parameter.
Experimental chat sessions
Uses an `x-chat-id` header and `/mcp/sessions` to keep a conversation tied to the same session.
Docker deployment
Includes a `Dockerfile` for running the server in a container.
How to get it
- 1Run
git clone https://github.com/membranehq/mcp-server.git cd mcp-server npm install npm run build
README
Membrane MCP Server
The Membrane MCP Server is a Model Context Protocol (MCP) server, it provides actions for connected integrations on Membrane as tools.
Here's our official AI Agent Example that shows you how to use this MCP server in your application.
π Prerequisites
- Node.js (v18 or higher)
- A Membrane account
βοΈ Installation
git clone https://github.com/membranehq/mcp-server.git
cd mcp-server
npm install
npm run build
π οΈ Local Development
To run the development server locally, start it with:
npm run dev
The server will be live at http://localhost:3000 β‘οΈ
π§ͺ Running tests
# Run the server in test mode
npm run start:test
# then run tests
npm test
π Deployment
Deploy your own instance of this MCP server to any cloud hosting service of your choice.
π³ Docker
The project includes a Dockerfile for easy containerized deployment.
docker build -t membrane-mcp-server .
docker run -p 3000:3000 membrane-mcp-server
π Connecting to the MCP server
This MCP server support two transports:
| Transport | Endpoint | Status |
|---|---|---|
| SSE (ServerβSent Events) | /sse | π΄ Deprecated β deprecated as of November 5, 2024 in MCP spec |
| HTTP (Streamable HTTP) | /mcp | π’ Recommended β replaces SSE and supports bidirectional streaming |
π Authentication
Provide a Membrane access token via query or Authorization header:
?token=ACCESS_TOKEN
Authorization: Bearer ACCESS_TOKEN
SSE (Deprecated)
await client.connect(
new SSEClientTransport(
new URL(
`https://<HOSTED_MCP_SERVER_URL>/sse`
)
{
requestInit: {
headers: {
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
},
}
)
);
Streamable HTTP (Recommended)
await client.connect(
new StreamableHTTPClientTransport(
new URL(`https://<HOSTED_MCP_SERVER_URL>/mcp`)
{
requestInit: {
headers: {
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
},
}
)
);
β‘ Static vs Dynamic Mode
By default, the MCP server runs in static mode, which means it returns all available tools (actions) for all connected integrations.
With dynamic mode (?mode=dynamic), the server will only return one tool: enable-tools. You can use this tool to selectively enable the tools you actually need for that session.
In dynamic mode, your implementation should figure out which tools are most relevant to the user's query. Once you've identified them, prompt the LLM to call the enable-tools tool with the appropriate list.
Want to see how this works in practice? Check out our AI Agent Example.
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
const client = new Client({
name: 'example-membrane-mcp-client',
version: '1.0.0',
});
const transport = new StreamableHTTPClientTransport(
new URL(`https://<HOSTED_MCP_SERVER_URL>/mcp?mode=dynamic`),
{
requestInit: {
headers: {
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
},
}
);
await client.connect(transport);
await client.callTool({
name: 'enable-tools',
arguments: {
tools: ['gmail-send-email', 'gmail-read-email'],
},
});
π§ Getting tools for a specific integrations
In static mode, the MCP server fetches tools from all active connections associated with the provided token.
You can choose to only fetch tools for a specific integration by passing the apps query parameter: /mcp?apps=google-calendar,google-docs
π¬ Chat Session Management (Experimental)
The MCP server (streamable-http transport only) supports persistent chat sessions. Include an x-chat-id header in your requests to automatically track sessions for that specific chat. This is an experimental feature that we provide in addition to standard MCP sessions.
Starting a new chat session:
POST /mcp
Authorization: Bearer YOUR_ACCESS_TOKEN
x-chat-id: my-awesome-chat-123
Retrieving your chat sessions:
GET /mcp/sessions
Authorization: Bearer YOUR_ACCESS_TOKEN
Response:
{
"my-awesome-chat-123": "session-uuid-1",
"another-chat-456": "session-uuid-2"
}
This feature lets you use same session for a conversation. Check out our AI Agent Example to see how this works in practice.
Configuring other MCP clients
π Cursor
To use this server with Cursor, update the ~/.cursor/mcp.json file:
{
"mcpServers": {
"membrane": {
"url": "https://<HOSTED_MCP_SERVER_URL>/sse?token={ACCESS_TOKEN}"
}
}
}
Restart Cursor for the changes to take effect.
π€ Claude Desktop
To use this server with Claude, update the config file (Settings > Developer > Edit Config):
{
"mcpServers": {
"membrane": {
"url": "https://<HOSTED_MCP_SERVER_URL>/sse?token={ACCESS_TOKEN}"
}
}
}
π§ Troubleshooting
- Ensure your access token is valid and you're generating it according to these instructions
- Check the MCP server logs for any errors or issues during startup or connection attempts.
- Use the MCP Inspector for testing and debugging
Files in the repo
- .github
- src
- tests
- .DS_Store
- .gitignore
- .prettierignore
- .prettierrc
- Dockerfile
- LICENSE
- package-lock.json
- package.json
- README.md
- tsconfig.json
- vitest.config.ts
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More connectors
High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph β average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

Universal provider proxy for OpenAI Codex & Claude Code β use any LLM (Claude, Gemini, Grok, DeepSeek, Ollamaβ¦) with Codex CLI, App, SDK, and Claude Code
Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300Β΅s in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.
Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.
Stop your AI from making things up β it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.