ustad-protocol-mcp

erdalgunes/ustad-protocol-mcp

3.2

If you are the rightful owner of ustad-protocol-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Ustad Protocol MCP is a minimal server designed for structured problem-solving and web search capabilities, leveraging the Model Context Protocol (MCP) framework.

Tools
2
Resources
0
Prompts
0

Ustad Protocol MCP

"Ustad" (Turkish/Urdu: "Master/Teacher") - Minimal MCP server with sequential thinking and search

MCP Version FastMCP

✨ Features

  • 🧠 Sequential Thinking: Structured problem-solving with chain-of-thought reasoning
  • šŸŽÆ Intent Analysis: Optional OpenAI-powered intent analysis with circuit breaker pattern
  • šŸ” Web Search: Tavily-powered search for fact-checking and research
  • 🐳 Containerized: Production-ready Docker setup with health checks
  • šŸ“” SSE Protocol: Real-time Server-Sent Events communication
  • šŸš€ FastMCP: Built on FastMCP for optimal performance
  • šŸ”’ Secure: Non-root container user, intelligent host detection (0.0.0.0 in containers, localhost in dev)

šŸš€ Quick Start

Docker Compose (Recommended)

# Clone the repository
git clone https://github.com/erdalgunes/ustad-protocol-mcp.git
cd ustad-protocol-mcp

# Configure environment
cp .env.example .env
# Edit .env and add your TAVILY_API_KEY

# Build and run
docker-compose up --build

Server will be available at http://localhost:8000

Local Development

# Install dependencies (uv is 10-100x faster than pip/poetry)
uv sync

# Set environment
export TAVILY_API_KEY=your_api_key_here

# Run server
uv run python ustad_mcp_server.py

šŸ› ļø Tools

ustad_think

Sequential thinking for structured problem-solving with optional intent analysis:

{
  "thought": "Analyzing the problem step by step",
  "thought_number": 1,
  "total_thoughts": 5,
  "next_thought_needed": true
}

Intent Analysis Features (when OpenAI configured):

  • Analyzes thought complexity and fact-checking needs
  • Enforces minimum 10 thinking steps for thorough reasoning
  • Circuit breaker pattern prevents cascading failures
  • Automatic fallback when OpenAI unavailable

ustad_search

Web search using Tavily API:

{
  "query": "Python best practices 2024",
  "max_results": 5,
  "search_type": "general"
}

šŸ“ Configuration

Set in .env file or environment:

VariableDescriptionDefault
TAVILY_API_KEYTavily API key for searchRequired
OPENAI_API_KEYOpenAI API key for intent analysisOptional (fallback if not set)
PORTServer port8000
HOSTServer hostAuto-detected based on environment

šŸ—ļø Architecture

.
ā”œā”€ā”€ ustad_mcp_server.py        # Main MCP server
ā”œā”€ā”€ src/
│   └── sequential_thinking.py # Sequential thinking logic
ā”œā”€ā”€ Dockerfile                 # Multi-stage Docker build
ā”œā”€ā”€ docker-compose.yml         # Docker Compose config
└── pyproject.toml            # Poetry dependencies

šŸ“„ License

MIT