LLaMa -Streamlit
AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).
claude mcp add --transport stdio nikunj2003-llama-mcp-streamlit docker run -i --rm --name llama-mcp-streamlit llama-mcp-assistant
How to use
Llama MCP Streamlit provides a chat-based interface built with Streamlit that connects to external tools via the Model Control Protocol (MCP). Through MCP, the assistant can execute real-time actions, fetch data, and orchestrate tools like LLM backends (NVIDIA NIM or Ollama) and other services defined in the MCP configuration. The Streamlit UI presents a conversational flow where user prompts can trigger MCP-enabled tool calls, returning results directly within the chat. This setup enables dynamic tool usage, such as querying external APIs, running file-system operations, or invoking custom MCP servers, all while maintaining a streamlined chat experience driven by the LLM.
To use the tools, simply type your request in the chat. If the LLM decides a tool is needed to fulfill your query, it will initiate an MCP call under the hood. You can monitor tool execution in real time as the MCP server mediates between the LM and the external tool. The app supports multiple LLM backends (NVIDIA NIM and Ollama), and you can switch models or APIs via configuration to tailor the assistant to your environment. The included Docker pathway makes deployment straightforward, and the NPX pathway (as documented in the MCP config) offers a quick, code-free way to spin up the server in environments that already have Node.js tooling installed.
How to install
Prerequisites
- Docker (recommended for deployment) or Python 3.11+ with Poetry for local development
- Git
- Internet access to fetch dependencies and model backends
Installation steps (Docker-based)
-
Clone the repository: git clone https://github.com/nikunj2003/llama-mcp-streamlit.git cd llama-mcp-streamlit
-
Build the Docker image (as described in the project): docker build -t llama-mcp-assistant .
-
Run with Docker Compose (as suggested in the README): docker compose up
-
Access the UI at the default port (usually http://localhost:8501)
Installation steps (Python/Poetry-based)
-
Ensure Python 3.11+ is installed and Poetry is available: python3 --version poetry --version
-
Create and activate a virtual environment, then install dependencies: poetry install
-
Start the Streamlit app: poetry run streamlit run llama_mcp_streamlit/main.py
-
Open the app in your browser at http://localhost:8501
Environment setup (both modes)
- Create a .env file at the project root and populate API keys and endpoints as required by the NVIDIA NIM and Ollama backends (as described in the README).
- If using Docker, ensure any required files or directories referenced by the MCP server are accessible to the container (via proper mounts in a docker-compose setup if used).
Note: While the Docker route is emphasized for deployment, the NPX path is also supported for some environments that already have Node.js tooling installed. Choose the option that matches your workflow.
Additional notes
Tips and common issues:
- Make sure your API keys and endpoints in .env are correctly configured for the NVIDIA NIM and Ollama backends. Misconfigured keys will prevent the LLM from calling external tools.
- If you switch between NVIDIA NIM and Ollama backends, ensure the corresponding API endpoints are reachable from the running environment.
- The MCP server configuration shown uses Docker. If you prefer NPX, adapt the mcp_server.py parameters (command: npx, appropriate args) as documented in the README.
- When using Docker, expose port 8501 for Streamlit or adjust the port mapping as needed. If you modify the Docker image name, update the mcp_config accordingly.
- For local development, ensure Poetry dependencies are installed and that Streamlit has permission to access your environment variables.
- If you encounter tool execution delays, verify network access to external APIs and ensure the MCP server has the necessary permissions to spawn or bind to required resources.
Related MCP Servers
npcpy
The python library for research and development in NLP, multimodal LLMs, Agents, ML, Knowledge Graphs, and more.
mcp -odoo
A Model Context Protocol (MCP) server that enables AI assistants to securely interact with Odoo ERP systems through standardized resources and tools for data retrieval and manipulation.
asterisk
Asterisk Model Context Protocol (MCP) server.
knowledgebase
BioContextAI Knowledgebase MCP server for biomedical agentic AI
esp32 server
A lightweight Model Context Protocol (MCP) server framework for ESP32. Seamlessly connect embedded devices to LLMs.
chatlab
LLM chat app for integration tests using llama-stack-client, llama, Ollama, MCP, Tools