mcp-service-gateway
A specialized runtime environment that broadcasts capabilities defined within an Integration Application workspace. It serves as the conduit enabling sophisticated AI entities to interface with diverse external functionalities via the Model Context Protocol specification.
Author

membranehq
Quick Info
Actions
Tags
Integration App Service Gateway for Model Context Protocol
The Integration App MCP Gateway functions as a compliant Model Context Protocol (MCP) endpoint, furnishing actionable interfaces (tools) accessible through the Integration.app unified membrane.
Refer to our official AI Agent Blueprint for a practical demonstration of utilizing this MCP gateway within your custom applications.
📋 Essential Prerequisites
- Node.js runtime environment (version 18 or newer is required)
- An active subscription/account on Integration.app
⚙️ Setup Procedure
To obtain the source code locally:
git clone https://github.com/integration-app/mcp-server.git
cd mcp-server
npm install
npm run build
🛠️ Local Iteration Environment
Initiate the development instance locally using the following command:
npm run dev
The server will commence operation, typically available at the address http://localhost:3000 ⚡️
🧪 Validation and Testing
Execute the server within a testing context:
# Start the gateway configured for test execution
npm run start:test
# Subsequently, run the defined test suite
npm test
🚀 Production Deployment Strategy
Deploy your bespoke instance of this MCP gateway to your preferred cloud infrastructure provider.
🐳 Containerization with Docker
The repository includes a Dockerfile facilitating straightforward deployment within a container.
docker build -t integration-app-mcp-server .
docker run -p 3000:3000 integration-app-mcp-server
🔗 Gateway Connectivity Protocols
This MCP gateway accommodates two primary data transmission mechanisms:
| Transport Protocol | Access Path | Operational Status | Protocol Link |
|---|---|---|---|
| SSE (Server‑Sent Events) | /sse |
🔴 Obsolete — Marked for deprecation as of Nov 5, 2024, per MCP specification | |
| HTTP (Streamable HTTP) | /mcp |
🟢 Preferred — Successor to SSE, supporting robust, bidirectional data flow |
🔐 Authorization Mechanism
Authentication requires presenting a valid Integration.app authentication credential either appended as a query parameter or included in the Authorization header:
?token=YOUR_SECRET_TOKEN
Authorization: Bearer YOUR_SECRET_TOKEN
SSE (Legacy)
await client.connect(
new SSEClientTransport(
new URL(
`https://<YOUR_HOSTED_URL>/sse`
)
{
requestInit: {
headers: {
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
},
}
)
);
Streamable HTTP (Modern)
await client.connect(
new StreamableHTTPClientTransport(
new URL(`https://<YOUR_HOSTED_URL>/mcp`)
{
requestInit: {
headers: {
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
},
}
)
);
⚡ Operation Modes: Static vs. Dynamic Tool Exposure
By default, the gateway operates in static mode, broadcasting the complete inventory of available actions (tools) for all linked integrations.
Activating dynamic mode (via the ?mode=dynamic query parameter) restricts the gateway to exposing only one tool: enable-tools. This mode mandates that your client logic determines the necessary functions for the current interaction. Subsequently, you must instruct the Large Language Model (LLM) to invoke enable-tools with the precise subset of required functions.
To observe this process in action, review our AI Agent Blueprint.
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
const client = new Client({
name: 'example-mcp-client-app',
version: '1.0.0',
});
const transport = new StreamableHTTPClientTransport(
new URL(`https://<YOUR_HOSTED_URL>/mcp?mode=dynamic`),
{
requestInit: {
headers: {
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
},
}
);
await client.connect(transport);
await client.callTool({
name: 'enable-tools',
arguments: {
tools: ['gmail-compose', 'gmail-retrieve-drafts'],
},
});
🔧 Scoping Tools to Specific Integrations
In static mode, the gateway aggregates functionalities from every active connection linked to the provided authorization token. You can restrict this scope to a defined set of applications by utilizing the apps query parameter: /mcp?apps=calendar-suite,document-manager
💬 Conversational Thread Management (Experimental)
The gateway (via streamable-http transport exclusively) offers support for maintaining continuous dialogue threads. To bind requests to a specific chat instance, include the x-chat-id HTTP header.
Initiating a New Thread:
POST /mcp
Authorization: Bearer YOUR_ACCESS_TOKEN
x-chat-id: my-unique-conversation-identifier
Querying Existing Thread Identifiers:
GET /mcp/sessions
Authorization: Bearer YOUR_ACCESS_TOKEN
Result Body:
{
"my-unique-conversation-identifier": "session-identifier-alpha",
"another-session-id": "session-identifier-beta"
}
This feature ensures conversational context persistence across multiple LLM turns. Integration details are available in our AI Agent Blueprint.
Configuring External MCP Consumers
📝 Cursor Editor Integration
To enable this service within the Cursor IDE, modify the configuration file located at ~/.cursor/mcp.json:
{
"mcpServers": {
"integration-app": {
"url": "https://<YOUR_HOSTED_URL>/sse?token={ACCESS_TOKEN}"
}
}
}
Remember to restart the Cursor application for these settings to take effect.
🤖 Claude Desktop Client
To integrate with Claude Desktop, navigate to Settings > Developer > Edit Config and update the file content:
{
"mcpServers": {
"integration-app": {
"url": "https://<YOUR_HOSTED_URL>/sse?token={ACCESS_TOKEN}"
}
}
}
🔧 Diagnostic Guidance
- Verify that the provided access token is valid, generated according to these specifications.
- Inspect the gateway logs for any startup failures or connection negotiation errors.
- Utilize the community-driven MCP Inspector for detailed connection diagnostics and validation.
WIKIPEDIA: Business management tools encompass all systemic resources—applications, oversight mechanisms, computational solutions, operational frameworks, etc.—utilized by enterprises to successfully navigate evolving market dynamics, maintain competitive standing, and enhance organizational output. == High-Level Survey == Tools are categorized by departmental function and managerial aspect, such as planning instruments, process automation aids, record-keeping systems, human capital resources, decision-support algorithms, and performance oversight controls. A functional categorization often includes:
- Data acquisition and integrity checks applicable across all divisions.
- Mechanisms for governing and optimizing enterprise workflows.
- Systems for data synthesis and strategic deliberation. Technological advancements have rapidly reshaped the landscape of management tools over the past decade, presenting a challenge in selecting optimal solutions for varied corporate environments. This complexity is driven by continuous pressures to reduce expenditures, amplify revenue, deeply understand client needs, and deliver requisite products precisely as demanded. In this climate, leadership must adopt a strategic posture toward these tools, rather than passively adopting the newest trend. Over-reliance on unmodified, off-the-shelf solutions frequently results in operational instability. Therefore, business management resources must be deliberately chosen and subsequently tailored to fit the unique requirements of the organization, reversing the common tendency.
== Prominent Instruments == In 2013, a global survey by Bain & Company profiled the deployment of business tools, revealing regional dependencies shaped by market conditions. The top ten instruments identified included:
Strategic planning Customer relationship management Employee engagement surveys Benchmarking Balanced scorecard Core competency identification Outsourcing strategies Change management programs Supply chain optimization Mission and vision articulation Market segmentation analysis Total quality management principles
== Enterprise Software Applications == Software, or collections of programs used by organizational personnel to execute diverse operational tasks, are termed business applications. These applications serve to elevate productivity metrics, quantify performance outcomes, and execute auxiliary corporate functions with precision. The evolution progressed from initial Management Information Systems (MIS) to comprehensive Enterprise Resource Planning (ERP) suites, later integrating Customer Relationship Management (CRM) functionalities, culminating in the contemporary paradigm of cloud-based business management platforms. While a direct correlation exists between IT investments and organizational success, two factors are critical differentiators: the efficacy of the implementation process and the prudence exercised in selecting and customizing the correct tools.
== Tools for Small and Medium Enterprises (SMEs) == Tools tailored for SMEs are vital as they offer avenues for operational savings and scalability improvements.
