Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP MCPO Demo Serverreverse this string: hello world"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP with MCPO Demo
This repository demonstrates how to build and run MCP (Model Context Protocol) tools using MCPO.
We'll cover everything from setup to creating sample tools and running the MCP server.
What is MCP?
MCP (Model Context Protocol) is a standard protocol that allows LLMs (like GPT, Claude, etc.) to interact with external tools, databases, and APIs efficiently.
What is MCPO?
MCPO is the official MCP Orchestrator, which manages your MCP servers and tools.
It allows your LLM to auto-discover available tools and decide when to call them.
1. Prerequisites
Python 3.11+
uv (Recommended for virtual environment management)
Git
2. Setup Instructions
Step 1 — Clone the Repository
git clone https://github.com/mkamranr/mcp-mcpo.git
cd mcp-mcpoStep 2 — Create Virtual Environment
uv venv --python 3.11Activate the environment:
Linux / Mac:
source .venv/bin/activateWindows (PowerShell):
.venv\Scripts\activateStep 3 — Install Dependencies
uv pip install fastmcp mcpoOr:
uv pip install -r requirements.txt3. Project Structure
MCP-MCPO/
├── tools/
│ ├── hello_world.py
│ ├── reverse_string.py
├── server.py
├── requirements.txt
├── .gitignore
└── README.md4. MCP Tools
4.1 Hello World Tool (tools/hello_world.py)
from fastmcp import tool
@tool()
def hello_world():
"""Simple Hello World tool."""
return {"message": "Hello World from MCP!"}4.2 Reverse String Tool (tools/reverse_string.py)
from fastmcp import tool
@tool()
def reverse_string(text: str):
"""Takes a string and returns its reverse."""
return {"reversed": text[::-1]}5. MCP Server (server.py)
from fastmcp import FastMCP
from tools.hello_world import hello_world
from tools.reverse_string import reverse_string
mcp_server = FastMCP("mcp-demo-server")
mcp_server.tool()(hello_world)
mcp_server.tool()(reverse_string)
6. Running the Server
mcpo --host 0.0.0.0 --port 8000 -- fastmcp run server.py:mcp_serverIf you want to run mcpo on https
mcpo --host 0.0.0.0 --port 8000 --ssl-keyfile /path/to/key.key --ssl-certfile /path/to/cert.crt -- fastmcp run server.py:mcp_server
7. Testing Tools
Hello World:
curl -X POST http://127.0.0.1:8000/tools/hello_worldResponse:
{ "message": "Hello World from MCP!" }Reverse String:
curl -X POST http://127.0.0.1:8000/tools/reverse_string -H "Content-Type: application/json" -d '{"text":"MCP Demo"}'Response:
{ "reversed": "omeD PCM" }License
MIT License © 2025