Remote MCP service overview

Estimated workIntended audience: This document is intended to help readers who already have a basic understanding of the Model Context Protocol (MCP) to delve deeper into Remote MCP cloud service.

1. Why choose the Remote MCP service?

Compared with traditional self-hosted tool integration solutions, the Remote MCP service offers significant advantages:

Considerations
Traditional self-hosted solution
Remote MCP cloud service

Infrastructure

Requires self-deployment, maintenance, and scaling of backend services

Professionally hosted by cloud providers, ensuring high availability, automatic scaling, and security compliance.

Authentication

Authentication and authorization flows (such as OAuth) must be developed and maintained in-house.

Vendors typically provide Managed Auth and secure credential storage services.

Tool ecosystem

Available toolset is more limited; adding new tools requires in-house development and integration.

Usually already integrates hundreds to thousands of ready-made tools and Actions, greatly accelerating development progress.

Maintenance and compatibility

You must handle tool version upgrades and API compatibility issues yourself.

The platform continuously updates and maintains compatibility, and client applications usually benefit without code changes.

Common use cases:

  • Personal task assistant: Directly call developer-favorite services like GitHub, Slack, Linear to enable code generation, issue tracking, automatic pull requests, and other features.

  • Smart customer service and ticketing system integration: AI customer service can use Remote MCP to query customer data in real time, create or update tickets in systems like Zendesk or Salesforce Service Cloud, and even perform customer service actions such as refunds.

  • Automated marketing campaign execution: Marketers can instruct the AI in natural language to operate marketing automation platforms like HubSpot via Remote MCP, for example: add lead lists, send personalized marketing emails, or dynamically adjust ad targeting strategies.

  • Google Workspace automation: The AI assistant can read/write Gmail messages, manage Google Calendar schedules, search/manage documents in Google Drive, or read/update data in Google Sheets via Remote MCP, enabling personal or team office automation.


2. Typical architecture of the Remote MCP service

2.1 Client / Agent SDK (Client / Agent SDK)

  • Provides a standardized interface for LLMs or AI assistants to dynamically retrieve the list of available tools and their function definitions (Schema) via APIs (for example GET /tools).

  • It usually encapsulates common logic such as request retry mechanisms, timeout control, and JSON Schema-based input/output validation to simplify application-layer development complexity and improve robustness.

2.2 Streaming Session Layer

  • Often adopts Server-Sent Events (SSE) or WebSocket technologies to establish persistent streaming sessions:

    • Bidirectional streams: Allow the AI assistant to make multiple, continuous tool calls during a single conversation lifecycle, achieving a more natural interactive experience.

    • This architecture is friendly to serverless environments (e.g., AWS Lambda, Google Cloud Functions) and makes horizontal scaling of the service easy to implement.

2.3 Auth & Credentials Vault

  • Users typically only need to complete the OAuth 2.0 authorization flow once in a trusted environment (such as a browser); the refresh token will then be encrypted and securely stored in the credentials vault.

  • The credentials vault will generate strictly time-limited Session Token or Signed JWT, for tool executors to access external services on behalf of the user within a limited time.

2.4 Tool Registry & Schema Store

  • Uses OpenAPI specification or JSON Schema and other standard formats to precisely describe each tool (Action)'s expected input parameters, data structures, and output result formats.

  • Supports version control (for example v1.2.0, v2-beta), ensuring backward compatibility for older client versions when tools evolve.

  • Some advanced platforms further provide AI-optimized Schemas (for example: automatically removing optional fields unnecessary for LLMs, providing richer context examples) to improve LLMs' efficiency in understanding tool capabilities and usage.

2.5 Execution Orchestrator

  • As the central scheduling hub, the execution orchestrator is responsible for parsing incoming parameters according to the tool Schema and intelligently routing requests to the corresponding Connector or Runner.

  • Usually integrates Circuit-Breaker design pattern: when detecting external API connection failures or timeouts, it can automatically perform exponential backoff retry strategies or fail fast and return clear error states (e.g., HTTP 50x) to avoid resource exhaustion and improve system resilience.

2.6 Observability & Governance

  • Distributed Tracing: Each tool call generates a unique Trace ID, making it easier to trace the full call chain across multiple microservices, simplifying troubleshooting and performance analysis.

  • Quota & Rate-Limit: Fine-grained request quotas and rate limits can be set based on tenant, individual user, or specific tool levels (e.g., QPS queries per second, RPM calls per minute) to prevent service abuse.

  • Audit Log: Record detailed key information about tool calls, such as timestamps, sources, parameter summaries, execution results, and statuses, to meet enterprise compliance and security review requirements.

2.7 Multi-Tenant Isolation

  • Access tokens for target SaaS services are strictly bound to specific workspace entities or tenant identifiers, and strict access control policies are enforced to prevent unauthorized cross-tenant data access and potential leakage risks.

  • Some platforms support Bring-Your-Own-Key (BYOK) encryption methods, allowing enterprises to use their own managed encryption keys to encrypt sensitive data, thereby enhancing data sovereignty and control.


3. Typical workflow (Sequence Diagram)

Workflow diagram
  1. Discovery: The AI assistant requests the list of available tools and their corresponding JSON Schemas from the Remote MCP service via standardized APIs.

  2. Planning: The large language model (LLM) analyzes and generates an execution plan based on the current user's intent and conversation context, deciding to use one or more tools (Actions).

  3. Invocation: The AI assistant's SDK formats the required parameters strictly according to the selected tool's Schema and initiates a tool invocation request to the Remote MCP service via secure APIs.

  4. Authentication & Authorization: The Remote MCP server first validates the API key carried in the request, then checks whether the tenant or user is authorized to execute that particular tool.

  5. Execution: Once authentication and authorization pass, the Orchestrator dispatches the request and the processed parameters to the registered Connector corresponding to the target external service. That connector is responsible for actually interacting with the external service (e.g., Google Calendar API).

  6. Streaming Response: The results of tool execution may include intermediate state updates or final data, returned to the AI assistant in real time via streaming technologies such as SSE or WebSocket in the form of JSON chunks or complete objects.

  7. Post-Processing: After the AI assistant's SDK receives the response, it validates the response data format and integrity according to the tool's Schema. If validation fails, the tool execution errors, or the result is unexpected, the SDK may trigger automatic retry mechanisms (if applicable), or submit error information and context to the LLM for next-step intelligent decisions (e.g., correct input parameters, ask the user for clarification, or try alternative tools).


4. Remote MCP application in MaiAgent

The MaiAgent platform, by integrating MCP services, provides its AI assistants powerful external tool access capabilities, enabling AI assistants to seamlessly interact with multiple third-party services and significantly improve work efficiency and service quality.

4.1 Integration features and benefits

  • Simplified tool configuration process: MaiAgent users only need to provide the Remote MCP server URL and complete authentication, without worrying about complex API key management, OAuth authorization flows, or developing connector code.

  • Rich tool ecosystem: Through Remote MCP providers (such as Composio, Zapier MCP, etc.), MaiAgent users can immediately access hundreds of pre-integrated tools and services, including:

    • Productivity suites: Google Workspace, Notion, Slack

    • Project management: Jira, Asana, Trello, Monday.com

    • Customer relationship management: Salesforce, HubSpot, Zendesk

    • Development tools: GitHub, Bitbucket, Linear

  • Fine-grained permission management: Administrators can assign a set of MCP tools that each AI assistant is allowed to use, ensuring assistants can only access the specific services and features needed for their work.

4.2 Typical use cases

  • Administrative assistant: The AI assistant can directly manage scheduling (create/modify/cancel meetings), organize mail inboxes, prepare meeting summaries, or update shared documents.

  • Customer support: The AI assistant can query order status, create support tickets, update customer data, and even handle simple refunds or order modification requests.

  • Development team collaboration: The AI assistant can help create issues, assign tasks, update project statuses, or retrieve specific information from code repositories.

  • Data analysis and reporting: The AI assistant can fetch external data from various data sources (such as Web Search, Salesforce) and generate formatted reports or visual charts.

4.3 MaiAgent-specific security and privacy protections

  • Data flow control: MaiAgent implements strict data flow controls to ensure sensitive information is transmitted only between authorized tools and assistants.

  • Activity auditing: All tool invocations are recorded in detailed audit logs, including invocation time, user, performed actions, and result summaries.

  • Dynamic configuration adjustments: AI assistant administrators can adjust or revoke configured tools for AI assistants at any time via the MaiAgent platform, with changes taking effect immediately.


Last updated

Was this helpful?