DocsStation
MCP

Building and Deploying Remote MCP Servers

By csestudy247 Updated December 2, 2026 3 min read
3 min read

If you have already mastered building local tools, you are actually 90% of the way to building remote ones. The FastMCP library makes the transition nearly seamless, requiring only a few lines of code changes to take your AI tools from your machine to the cloud.

Why Go Remote?

While local servers are fast because they run on the same machine as your client, they are limited to that single device. Remote MCP Servers offer several advantages:

  • Multi-Client Support: Multiple users can connect to the same server simultaneously.
  • Enhanced Compute: They typically run on powerful internet servers, allowing you to perform more “compute-intensive” tasks than a standard laptop might handle.
  • Global Accessibility: Once deployed, anyone in the world with the URL can use your MCP server in their own AI client.

The Key Difference: Transport

In a local setup, the communication happens via STDIO (Standard Input/Output). For a remote server, we switch the transport to HTTP (specifically using Server-Sent Events or SSE).

The coding logic for your tools and resources remains exactly the same. The only major change is the final line of your script:

Local Version: mcp.run() Remote Version: mcp.run(transport="http", host="0.0.0.0", port=8000)

This tells FastMCP to listen for incoming web requests rather than waiting for local system commands.


Deploying to the Cloud (FastMCP Cloud)

The easiest way to put your server online is using FastMCP Cloud, a free service designed specifically for this protocol.

  1. Host on GitHub: Push your code (including your main.py and pyproject.toml) to a GitHub repository.
  2. Connect to FastMCP Cloud: Login to fastmcp.cloud and link your GitHub account.

from fastmcp import FastMCP
import random

# Create the FastMCP server
mcp = FastMCP("Demo Server")


@mcp.tool()
def roll_dice(n_dice: int) -> list[int]:
    """
    Roll one or more six-sided dice.

    Args:
        n_dice: Number of dice to roll.

    Returns:
        A list of random dice values.
    """
    return [random.randint(1, 6) for _ in range(n_dice)]


@mcp.tool()
def add_numbers(a: float, b: float) -> float:
    """
    Add two numbers.

    Args:
        a: First number.
        b: Second number.

    Returns:
        Sum of a and b.
    """
    return a + b


if __name__ == "__main__":
    mcp.run()

GitHub LInk Full Code

  1. Deploy: Select your repository and click “Deploy.” The platform will automatically build your environment and provide you with a public URL.



Connecting Claude Desktop to Remote Servers


Once your server is live, you can integrate it into Claude Desktop.

  • For Claude Free Users: Claude has a built-in “Add Custom Connector” feature in the settings. You simply paste your remote server’s URL, and the tools appear instantly.

Remote MCP servers represent the future of “Enterprise MCP,” where companies will host specialized AI tools that their entire workforce can access from any device

Remote MCP Servers Quiz

Q.1 What is the primary advantage of a Remote MCP server over a Local MCP server?



  • Higher communication speed due to local execution.


  • Ability to serve multiple clients simultaneously and utilize powerful compute resources.


  • Native access to the host machine's local file system.


  • Zero configuration requirement for transport protocols.

Q.2 When configuring a Remote MCP server in FastMCP, which transport protocol must be specified for internet communication?



  • SSE (Server-Sent Events).


  • WebSockets.


  • HTTP.


  • STDIO.

Q.3 What is the significance of setting the host to 0.0.0.0 in a FastMCP server?



  • It blocks unauthorized users.


  • It allows the server to listen on all available network interfaces.


  • It automatically assigns a public IP address.


  • It restricts access to localhost only.

Q.4 Why did the initial cloud deployment of the Expense Tracker server fail to add new expenses?



  • SQLite is unsupported in cloud environments.


  • The SQLite database was opened in read-only mode.


  • The database became corrupted after pushing to GitHub.


  • The deployment ran out of storage space.

Q.5 What is the primary advantage of converting a synchronous MCP server to an asynchronous one using aiosqlite?



  • It automatically encrypts the database.


  • It reduces the database size.


  • It enables the server to process multiple concurrent requests without blocking.


  • It removes the need for HTTP transport.

Q.6 How does a Proxy Server help Claude Desktop users without a Pro subscription?



  • It upgrades their account automatically.


  • It acts as a local bridge that connects the local client to a remote MCP server.


  • It removes the need for internet access.


  • It speeds up remote servers through caching.

Q.7 What major logical flaw exists in the multi-user remote Expense Tracker server?



  • It cannot store more than 100 expenses.


  • It only functions during weekdays.


  • It was written in Python.


  • There is no user isolation, so all users share the same expense data.

Q.8 Which tool provides a browser-based interface for inspecting and debugging MCP servers?



  • GitHub Desktop.


  • Claude Desktop.


  • MCP Inspector using 'fastmcp dev'.


  • Postman.

Q.9 Which tool was used to initialize the remote deployment project and manage its dependencies?



  • UV.


  • Conda.


  • Npm.


  • Pip.

Q.10 Which file should be modified in Claude Desktop if the automatic installation does not include the full executable path?



  • config.json (Claude Desktop configuration).


  • requirements.txt.


  • categories.json.


  • main.py.

Scroll to Top