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
⨠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:
Variable | Description | Default |
---|---|---|
TAVILY_API_KEY | Tavily API key for search | Required |
OPENAI_API_KEY | OpenAI API key for intent analysis | Optional (fallback if not set) |
PORT | Server port | 8000 |
HOST | Server host | Auto-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