Running Example Fast MCP Server

BlueRock Secure MCP Server for FastMCP comes with an example MCP server built with the FastMCP Pythonic Framework.

FastMCP v2.13 is preloaded onto the Amazon Linux 2023 instance. An example Fast MCP server, Anthropic's Weather Forecast MCP, is bundled with the image as well.

Running FastMCP

Step 1: Log in to your BlueRock Free Tier instance AMI

ssh -i <ssh-key-file> ec2-user@<ip address>

Step 2: Launch FastMCP Server

For full documentation on FastMCP go to the FastMCP website.

On the BlueRock instance, change to the FastMCP directory.

cd /opt/bluerock/mcp/fastmcp

Activate a python virtual environment

source .venv/bin/activate

Create a sample MCP server in a file my_server.py

from fastmcp import FastMCP

mcp = FastMCP("My MCP Server")

@mcp.tool
def greet(name: str) -> str:
    return f"Hello, {name}!"

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

Start the sample server.

Running the example Weather Fast MCP Server

Step 1: Log in to your BlueRock Free Tier instance AMI

Step 3: Start the MCP Weather Server and MCP Weather Client

Start MCP Server

Start MCP Client

Login the ec2 instance in a separate terminal (see Step 1)

Run Weather MCP Tools

Last updated