MCP MCPO Demo Server

MCP MCPO Demo Server

A demonstration MCP server that provides basic utility tools including hello world functionality and string reversal operations. Shows how to build and deploy MCP tools using the MCPO orchestrator framework.

Category
Visit Server

README

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-mcpo

Step 2 — Create Virtual Environment

uv venv --python 3.11

Activate the environment:

Linux / Mac:

source .venv/bin/activate

Windows (PowerShell):

.venv\Scripts\activate

Step 3 — Install Dependencies

uv pip install fastmcp mcpo

Or:

uv pip install -r requirements.txt

3. Project Structure

MCP-MCPO/
├── tools/
│   ├── hello_world.py
│   ├── reverse_string.py
├── server.py
├── requirements.txt
├── .gitignore
└── README.md

4. 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_server

If 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_world

Response:

{ "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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured