How elkhn/mcp-playground works
Project Type and Purpose
• This is a containerized, micro-service playground combining a Streamlit-based chat UI with multiple FastMCP tool servers.
• Purpose: Let users chat with LLMs (via LangChain/LangGraph) and dynamically invoke external “MCP” tools (Weather, Currency) in a provider-agnostic way.
File Structure
• Top level:
• docker-compose.yaml → orchestrates three services (client + two servers)
• client/ → Streamlit front-end application
• servers/ → two FastMCP back-end tool servers (weather + currency)
• client/ breakdown:
• app.py, config.py, servers_config.json → entry point and runtime settings
• services/ → wrappers for AI provider, MCP orchestration, chat logic
• ui_components/ → Streamlit widgets (sidebar, main panel)
• utils/ → prompt definitions, async helpers, schema parser
• servers/ breakdown: each contains a Dockerfile, main.py, requirements.txt hosting FastMCP tools
README for Additional Insights
• Confirms architecture:
• Streamlit client ↔ multiple FastMCP servers, all in Docker Compose
• Uses LangChain + LangGraph to create a React agent that auto-discovers tools
• Supports plugging in new MCP servers via servers_config.json
• External dependencies: OpenAI, Amazon Bedrock, Anthropic, Google Gemini
Elements
• Green for UI components
• Blue for internal services (agent, chat, ai_service, mcp_service)
• Orange for external systems (LLM providers, MCP servers)