Demo MCP Server
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., "@Demo MCP Servermake a cow say 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.
Demo MCP Server
A minimal FastMCP Python server demonstrating basic MCP (Model Context Protocol) functionality with a simple cowsay tool.
Features
FastMCP Server: Simple MCP server implementation
Cowsay Tool: Generate ASCII art of a cow saying custom messages
Environment Configuration: .env file support with Pydantic settings
Docker Support: Full Docker and docker-compose setup
Testing: Basic unit tests with pytest
KISS Principle: Keep It Simple, focused implementation
Related MCP server: MCP Example Simple Server
Quick Start
Local Development
Install dependencies:
make install-devRun the server (http mode on port 8005):
make run-httpRun tests:
make test
Docker
Build and run:
make docker-build make docker-runFor HTTP transport:
make docker-run-http
Project Structure
my-mcp-server/
├── src/
│ ├── config/
│ │ └── settings.py # Environment configuration
│ └── mcp/
│ ├── __main__.py # Entry point
│ ├── server.py # FastMCP server setup
│ └── tools/
│ └── cowsay.py # Cowsay MCP tool
├── tests/ # Unit tests
├── .env.example # Environment variables template
├── docker-compose.yml # Docker compose configuration
├── Dockerfile # Docker container definition
├── Makefile # Common commands
└── pyproject.toml # Python project configurationAvailable Tools
cowsay
Generate ASCII art of a cow saying a message.
Parameters:
message(str): The message for the cow to saycow(str, optional): The type of cow to use (default: "default")
Example:
result = await cowsay("Hello, World!")Output:
_______________
< Hello, World! >
---------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||Configuration
The server uses environment variables for configuration. Copy .env.example to .env and customize:
cp .env.example .envAvailable Settings
Variable | Default | Description |
| "Demo MCP Server" | Application name |
| "INFO" | Logging level |
| "stdio" | MCP transport method |
| "127.0.0.1" | Host for HTTP transport |
| "8000" | Port for HTTP transport |
| "500" | Maximum cowsay message length |
Usage with MCP Clients
Claude Desktop
Add to your MCP settings:
{
"mcpServers": {
"demo-mcp-server": {
"command": "python",
"args": ["-m", "src.mcp"],
"cwd": "/path/to/my-mcp-server"
}
}
}Command Line
# STDIO transport (default)
python -m src.mcp --transport stdio
# HTTP transport
python -m src.mcp --transport http --port 8000
# Help
python -m src.mcp --helpDevelopment
Available Make Commands
make help # Show all available commands
# Development
make install # Install dependencies
make install-dev # Install with dev dependencies
make test # Run tests
make test-verbose # Run tests with verbose output
# Running
make run # Run server locally (STDIO)
make run-http # Run server locally (HTTP)
make health # Check server health
# Docker
make docker-build # Build Docker image
make docker-run # Run in Docker (STDIO)
make docker-run-http # Run in Docker (HTTP)
make docker-stop # Stop containers
make docker-clean # Clean containers and images
# Cleanup
make clean # Clean build artifactsTesting
# Run all tests
make test
# Run with coverage
python -m pytest --cov=src --cov-report=html
# Run specific test
python -m pytest tests/test_cowsay.py -vAdding New Tools
Create a new tool file in
src/mcp/tools/Implement the tool using FastMCP patterns
Register it in
src/mcp/server.pyAdd tests in
tests/
Example tool structure:
from fastmcp.tools import Tool
def create_my_tool() -> Tool:
async def my_tool(param: str) -> dict:
# Tool implementation
return {"success": True, "result": param}
return Tool(
name="my_tool",
description="Description of my tool",
func=my_tool,
)Docker
Building
docker-compose buildRunning
STDIO mode (for MCP clients):
docker-compose up demo-mcp-serverHTTP mode (for testing):
docker-compose --profile http up demo-mcp-httpEnvironment Variables in Docker
Create a .env file or set environment variables in docker-compose.yml:
environment:
- APP_NAME=My Custom MCP Server
- LOG_LEVEL=DEBUGHealth Checks
Check server health:
make healthOr directly:
python -c "from src.mcp.server import get_server_health; import json; print(json.dumps(get_server_health(), indent=2))"License
MIT License - feel free to use this as a starting point for your own MCP servers.
Contributing
This is a demo/seed project. Feel free to fork and extend it for your own needs.
Happy MCP Development! 🐄
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/guilleyalo/my-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server