AI & Agents

How to Build a Custom Manus MCP Server

To connect a custom manus mcp server to your agent, you can deploy a remote HTTP service to handle tool executions. This guide shows how to write a Python MCP backend using FastAPI, implement bearer authorization, and register it via the Direct Configuration menu. By persisting agent outputs in a shared Fast.io workspace, you can coordinate tasks and secure your generated files across sandboxed execution sessions.

Fast.io Editorial Team 10 min read
An illustration of a custom Manus MCP server configuration

Why autonomous agents need a remote Manus MCP configuration

The official Model Context Protocol registry reached 9,652 server records in mid-2026, representing a major shift toward decentralized agent capabilities [Digital Applied MCP Ecosystem Report]. While local desktop environments run on local standard input and output pipes, remote cloud-hosted agents like Manus demand a different architectural approach. This official 9,652-server registry represents the foundation of a remote integration ecosystem. A custom Manus MCP server is a JSON-RPC 2.0 web service running over HTTP that exposes bespoke tools and database integrations to the Manus agent. This remote connection format enables the cloud agent to trigger code execution and query files hosted outside its virtual sandbox.

Autonomous agents like Manus operate within ephemeral container sandboxes that are wiped clean after a task completes. While sandboxing provides security by isolating the agent, it introduces data persistence challenges. If the agent generates a PDF invoice, aggregates research notes, or runs code tests, those output files are deleted once the session terminates. Developers have tried various alternatives to save these outputs, but each comes with limitations. Local storage via a desktop terminal client locks files to a single workstation and prevents team collaboration. Cloud object storage like Amazon S3 provides durability but requires complex IAM keys and secret management inside agent scripts. Consumer options like Google Drive offer simple folders but suffer from rate limits during high-frequency agent operations and lack database features.

Using persistent Fast.io workspaces resolves these lifecycle problems by providing a shared, version-controlled storage environment. By deploying an MCP connection between Manus and Fast.io, the agent can write output files directly to shared folders. This architecture ensures that all files are saved in a persistent workspace where human developers and agents can access them concurrently. Fast.io automatically handles version tracking, meaning the team can inspect history and revert changes if the agent overwrites a file incorrectly.

How to design a custom Manus MCP server in Python

Building a custom Model Context Protocol server in Python requires handling JSON-RPC 2 messages, generating schemas, and validating parameters. The FastMCP framework simplifies this development by abstracting the protocol details, letting you write standard Python functions and expose them as agent tools using decorators. To make the server reachable by a remote agent like Manus, you must serve the application over Server-Sent Events (SSE) using a web framework like FastAPI. This allows the agent to establish a persistent downstream connection and send upstream tool execution requests over HTTP POST endpoints.

The following Python implementation demonstrates how to build an MCP server, define a custom tool with strict typing, and mount the SSE transport inside a FastAPI application. The script uses environment variables to verify a bearer token, securing the server against unauthorized access.

import os
from fastapi import FastAPI, Depends, HTTPException, status
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
from fastmcp import FastMCP
app = FastAPI(title="Custom Manus MCP Server")
security = HTTPBearer()
def verify_token(credentials: HTTPAuthorizationCredentials = Depends(security)):
    token = credentials.credentials
    expected_token = os.environ.get("MANUS_MCP_SECRET")
    if not expected_token or token != expected_token:
        raise HTTPException(
            status_code=status.HTTP_401_UNAUTHORIZED,
            detail="Invalid or missing authorization token"
        )
mcp = FastMCP("Client Database Connector")
@mcp.tool()
def fetch_client_record(client_id: int) -> dict:
    """Retrieves client account details. Args: client_id: customer id."""
    return {"client_id": client_id, "name": "Acme Corporation", "status": "Active", "balance": 1250.50}
app.mount("/mcp", mcp.make_sse_app())

When the Manus agent connects to the SSE URL, it runs a tool discovery check. The agent parses the function signature, type hints, and docstrings of the decorated tools to construct its system context. For instance, the docstring in the fetch_client_record function teaches the agent exactly when and how to call the tool. The agent automatically generates the JSON-RPC schema, ensuring that parameter validation happens before the database query runs. This structured metadata allows the agent to decide dynamically which tool is appropriate for a given task.

Steps to deploy and secure your remote endpoint

Because the Manus agent is hosted in the cloud, it cannot access local processes running on your workstation's loopback interface. You must deploy your Python server to a cloud hosting provider, such as Fly.io, Render, or Google Cloud Run, to make it accessible over the web. During deployment, you must configure a secure HTTPS endpoint because Manus rejects unencrypted HTTP traffic. Additionally, you must set the environment variable MANUS_MCP_SECRET to a secure token value. This token acts as the shared secret between the agent and your service.

Securing the endpoint is a critical step because your custom tools may expose sensitive database operations or file system access. Without authentication, anyone who discovers your public URL could execute tools on your backend. By requiring a Bearer token in the request headers, your FastAPI app blocks unauthorized traffic at the network boundary. The validation dependency ensures that only requests carrying your secret token are allowed to invoke the underlying MCP handlers.

Hosting and maintaining a custom server infrastructure can introduce operational overhead for teams. Instead of managing your own cloud runtimes and secret keys for file manipulation, you can use Fast.io's dedicated MCP server. Fast.io exposes Streamable HTTP at /mcp and legacy SSE at /sse, providing direct access to workspace tools [Fast.io Reference]. The Fast.io MCP server allows your agent to write files, search directories, and manage folders without requiring you to maintain custom backend code. You can read the Fast.io storage for agents documentation for specific tool surfaces and parameter requirements.

Fastio features

Connect your Manus agents to persistent folders

Provide your autonomous workflows with persistent workspaces, automated version history, and built-in search. Start with a 14-day free trial.

How to complete your Manus MCP connector setup in direct configuration

Connecting your custom MCP server to the Manus agent is completed directly within the web interface. To configure a custom server, you will use the settings panel to register your HTTP endpoint and authorization headers. This direct configuration setup registers the server as a global connector, making its custom tools available across your active task sessions.

To complete the Manus mcp connector setup, follow these steps:

  1. Open Settings: Click the settings option located in the sidebar of the Manus application interface.
  2. Navigate to Connectors: Click the Connectors tab to view your active and configured integrations.
  3. Add Connector: Click the "+ Add connectors" button in the top right corner of the workspace.
  4. Select Custom MCP: Click the Custom MCP tab to access external protocol configurations.
  5. Choose Direct Configuration: Click the "Direct configuration" option to enter manual settings.
  6. Enter Server Name: Type a clear name for your connector, such as "Fast.io Persistent Storage" or "Database Connector".
  7. Input Connection Details: Select HTTP as the transport type and enter your hosted server URL, such as https://mcp.fast.io/mcp/key.
  8. Configure Authorization: Add the required custom header with Authorization as the key and Bearer as the value.

Once you save the connector, Manus registers the endpoint. To use the custom tools in a workflow, start a new task run and locate the connector icon inside the task input bar. Toggle the connector on for that specific session. Manus will query the SSE endpoint to discover the tool schema, making the tools available for prompt execution. If you need to troubleshoot, you can test the connection by inspecting the tool logs in the settings menu or running the server locally with the MCP Inspector to verify that JSON-RPC messages are routing correctly.

How to extract structured data with Metadata Views

When your agent writes reports or logs to a persistent workspace, the resulting files often contain unstructured information that is difficult to query. Fast.io provides structured data extraction tools to help teams organize agent outputs without writing custom parsing scripts. By using Metadata Views, you can transform raw files into a live, queryable database.

With Metadata Views, users describe the target fields they want extracted in natural language. The system's AI designs a typed schema that supports Text, Integer, Decimal, Boolean, URL, JSON, and Date & Time formats. Metadata Views scans incoming PDFs, spreadsheets, and notes, automatically populating a spreadsheet with the extracted properties. You can add new columns to the view at any time without reprocessing existing documents. This structured extraction layer is detailed at the Metadata Views product page: /product/document-data-extraction/. It operates alongside Fast.io's Intelligence Mode, which handles semantic search and RAG queries.

For developers building tools for external clients, Fast.io supports ownership transfer. An agent can configure the workspace, set up the Metadata Views, and transfer the organization to a human client once the work is complete. The client can then manage the files and view the spreadsheet under a paid subscription. Fast.io offers three paid subscription plans: Starter is priced at $29/mo, Business is priced at $99/mo, and Growth is priced at $299/mo [Fast.io Pricing]. Every organization starts with a 14-day free trial that requires a credit card to activate. This trial period allows your team to test the MCP server, verify the extraction views, and integrate persistent storage into your agent pipelines before committing to a paid plan.

Frequently Asked Questions

Does Manus support Model Context Protocol?

Manus supports the Model Context Protocol natively. This integration allows the agent to communicate with custom web services, databases, and persistent cloud workspaces using standardized JSON-RPC 2 tool calls over HTTP transport.

How do I connect a custom MCP server to Manus?

You can connect a custom MCP server to Manus by navigating to the settings sidebar, selecting Connectors, clicking Add connectors, choosing the Custom MCP tab, and entering your endpoint URL via Direct Configuration. You must also supply any required authorization headers.

How do I build an MCP server in Python?

You can build an MCP server in Python using the FastMCP framework, which handles JSON-RPC schema generation. By running the server using uvicorn and exposing an SSE application, you can deploy a remote HTTP endpoint suitable for cloud agents.

Can my Manus agent write files to Fast.io?

Your Manus agent can write files to Fast.io by connecting to the Fast.io MCP server. This allows the agent to programmatically save reports, research logs, and artifacts to a persistent cloud workspace shared with human team members.

Related Resources

Fastio features

Connect your Manus agents to persistent folders

Provide your autonomous workflows with persistent workspaces, automated version history, and built-in search. Start with a 14-day free trial.