Token导航 LogoToken导航TokenDH.com
MCP Chat Assistant logo
开发工具stdio官方级别未说明来源级核验

MCP Chat Assistant

MCP Server

一个基于Model Context Protocol (MCP)和本地LLM (Ollama)构建的强大命令行AI聊天助手,支持智能、上下文感知的对话,无需依赖付费API。

工具数

0

提示词数

0

GitHub Stars

1

资源数

0
命令行工具PythonClaude上下文感知Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Kuldeepkolage

提供方

Kuldeepkolage

最后核验

2026/5/17 20:21

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

Python 3.9+

详细介绍

🚀 MCP聊天助手

⚡ 一个强大的命令行AI聊天机器人,使用 模型上下文协议(MCP)当地LLM(Ollama) --实现智能、上下文感知的对话,而无需依赖付费API。

______________________________________________________________________

✨ 特性

  • 🤖 交互式人工智能聊天机器人(基于CLI)
  • 🧠 上下文感知对话处理(RAG风格提示)
  • 📄 使用文档检索 @filename
  • ⚙️ 基于命令的执行使用 /commands
  • 🔌 通过MCP(模型上下文协议)可扩展的工具架构
  • 💻 完全运行 离线 使用Ollama(无API成本)

______________________________________________________________________

🧑‍💻 技术栈

  • 语言: python
  • 架构: 模型上下文协议(MCP)
  • LLM Ollama(calla3-本地推理)
  • CLI框架: 提示工具包
  • 环境管理: python dotenv
  • 包管理器(可选): 紫外线

______________________________________________________________________

📸 演示

> what's 1+1?
2
> Tell me about @report.pdf
The report.pdf document contains information about...
> /summarize deposition.md
📦 Prerequisites
Python 3.9+
Ollama installed → https://ollama.com
⚙️ Setup
1️⃣ Configure Environment Variables

Create a .env file in the root directory:

CLAUDE_MODEL=llama3
2️⃣ Install Dependencies
Option 1: Using uv (Recommended)
pip install uv
uv venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
uv pip install -e .
uv run main.py
Option 2: Without uv
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install python-dotenv prompt-toolkit "mcp[cli]==1.8.0" ollama
python main.py
🧠 Usage
💬 Basic Chat
> Hello
📄 Document Retrieval

Use @filename to include document context:

> Tell me about @deposition.md
⚙️ Commands

Execute MCP-defined commands:

> /summarize deposition.md
🏗️ Project Structure
MCP-Chat-Assistant/
│
├── core/
│   ├── chat.py          # Core chat logic
│   ├── claude.py        # LLM interface (Ollama-based)
│   ├── cli.py           # CLI controller
│   ├── cli_chat.py      # CLI + MCP integration
│   └── tools.py         # MCP tool management
│
├── mcp_client.py        # MCP client (tool + resource access)
├── mcp_server.py        # MCP server (documents + tools)
├── main.py              # Entry point
├── .env                 # Environment config
└── README.md
⚠️ Note on Tool Execution

This project fully implements the MCP architecture, including tools and resources.

However:

🔹 Ollama (local LLM) does not support native tool-calling
🔹 Tool execution logic is preserved but currently disabled
🔹 System still supports context-based document retrieval (RAG)

👉 This architecture can be extended with OpenAI/Anthropic APIs for full tool execution.

🚀 Future Improvements
🧠 Persistent memory (chat history storage)
🌐 Web UI (React / Next.js frontend)
🔊 Voice input/output integration
☁️ Hybrid mode (local + API-based LLM)
🧩 Advanced MCP tool execution with function-calling LLMs
🎯 Learning Outcomes
Deep understanding of Model Context Protocol (MCP)
Building AI systems with client-server architecture
Implementing RAG (Retrieval-Augmented Generation)
Integrating local LLMs (Ollama) into applications
Handling real-world limitations of LLM tool usage
👨‍💻 Author

Kuldeep Kolage
🔗 GitHub: https://github.com/Kuldeepkolage

⭐ Support

If you found this project helpful:

⭐ Star this repository
🍴 Fork it
🚀 Build and improve on top of it

💡 This project demonstrates how modern AI systems can be built using local models, structured protocols, and scalable architecture — without relying on paid APIs.

---

目录标签

目录标签

命令行工具PythonClaude上下文感知本地部署AI聊天离线运行文档检索

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP