MCP Chat
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., "@MCP ChatSummarize report.pdf"
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.
MCP Chat
Note: This project is an extension of the MCP certification project originally sourced from the Anthropic Claude MCP course. It has been extended to support local LLMs instead of the Anthropic API, along with additional tooling and improvements.
A command-line interface application that enables interactive chat with a local LLM (via Ollama or any OpenAI-compatible server) using the MCP (Model Context Protocol) architecture for document management.
Prerequisites
Python 3.9+
Ollama or any OpenAI-compatible local LLM server
Setup
Step 1: Configure environment variables
Create a .env file in the project root:
LOCAL_LLM_MODEL=llama3.2
LOCAL_LLM_BASE_URL=http://localhost:11434/v1
USE_UV=1 # Set to 0 if not using uvStep 2: Install dependencies
Option 1: With uv (Recommended)
uv is a fast Python package installer and resolver.
pip install uv
uv venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install -e .Option 2: Without uv
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install openai python-dotenv prompt-toolkit "mcp[cli]==1.8.0"Step 3: Start your local LLM
# Ollama example
ollama serve
ollama pull llama3.2Step 4: Run the project
# With uv
uv run main.py
# With additional MCP servers
uv run main.py extra_server.py another_server.pyUsage
Basic Chat
Type your message and press Enter:
> What is the state of the condenser tower?Document Retrieval
Use @ followed by a document ID to include its contents in your query:
> Tell me about @deposition.md
> Summarize @financials.docxDemo
MCP Chat running with llama3.2 via Ollama on Windows
Commands
Use / prefix to execute MCP prompts. Press Tab to autocomplete:
> /format deposition.md
> /summarize report.pdfAvailable Documents
Document | Description |
| Testimony of Angela Smith, P.E. |
| State of a 20m condenser tower |
| Project budget and expenditures |
| Projected future performance |
| Project implementation steps |
| Technical equipment requirements |
Architecture
main.py
├── MCPClient # Manages stdio communication with MCP server(s)
├── mcp_server.py # FastMCP server — tools, resources, prompts
├── core/claude.py # Local LLM integration (OpenAI-compatible)
├── core/cli_chat.py # Chat logic with @ and / command handling
└── core/cli.py # Terminal UI with Tab autocompleteMCP Server Features
Feature | Name | Description |
Tool |
| Read the contents of a document by ID |
Tool |
| Replace text within a document |
Resource |
| List all available document IDs |
Resource |
| Fetch contents of a specific document |
Prompt |
| Rewrite a document in Markdown format |
Development
Adding New Documents
Edit the docs dictionary in mcp_server.py:
docs = {
"your_doc.md": "Your document content here",
}Adding New MCP Servers
Pass additional server scripts as arguments when running:
uv run main.py your_custom_server.pyAdding New Tools / Prompts / Resources
Use the FastMCP decorators in mcp_server.py:
@mcp.tool(name="my_tool", description="Does something useful")
def my_tool(input: str) -> str:
return f"Processed: {input}"Known Limitations
Document edits are in-memory only and lost on server restart
No persistent storage backend
No authentication or multi-user support (stdio only — single client per server instance)
Troubleshooting
OneDrive hardlink error on Windows:
$env:UV_LINK_MODE = "copy"; uv pip install -e .Local LLM not responding:
Ensure Ollama is running:
ollama serveConfirm the model is pulled:
ollama pull llama3.2Check
LOCAL_LLM_BASE_URLin.envmatches your server
Module not found errors:
uv add openai python-dotenv mcpResources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/KrishnaMuddala/cli_project_local_llm'
If you have feedback or need assistance with the MCP directory API, please join our Discord server