Local_MCP_Client

Local_MCP_Client

🚀 本地 MCP 客户端

本地 MCP 客户端是一个跨平台的网页和 API 接口,可通过自然语言与可配置的 MCP 服务器进行交互。它由 Ollama 和任何本地大语言模型(LLM)驱动,支持结构化工具执行和动态代理行为。

🚀 快速开始

✨ 主要特性

  • 跨平台:支持在 MAC、Linux 和 Windows 系统上使用。
  • 自然语言交互:通过自然语言与 MCP 服务器交互。
  • 由 Ollama 和本地 LLM 驱动:提供灵活的语言处理能力。
  • 支持结构化工具执行和动态代理行为。

📦 安装指南

创建虚拟环境并安装依赖项

MAC/Linux

curl -LsSf https://astral.sh/uv/install.sh | sh
cd Local_MCP_Client
uv init .
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt

Windows

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
cd Local_MCP_Client
uv init .
uv venv
.venv\Scripts\activate
uv pip install -r requirements.txt

安装 Ollama 并拉取 LLM 模型

MAC

brew install ollama
ollama serve
ollama pull llama3:8b

Linux

curl -fsSL https://ollama.com/install.sh | sh
ollama serve
ollama pull llama3:8b

Windows

在此处下载 Ollama HERE

ollama serve
ollama pull llama3:8b

克隆 MCP 服务器

MAC/Linux

cd ~/Documents
git clone https://github.com/mytechnotalent/MalwareBazaar_MCP.git
git clone https://github.com/Invoke-RE/binja-lattice-mcp

Windows

cd "$HOME\Documents"
git clone https://github.com/mytechnotalent/MalwareBazaar_MCP.git
git clone https://github.com/Invoke-RE/binja-lattice-mcp

💻 使用示例

运行 Ollama

ollama serve

运行 MCP 客户端

MAC/Linux

export BNJLAT = ""
uv run local_mcp_client.py

Windows

$env:BNJLAT = ""
uv run local_mcp_client.py

运行测试

python -m unittest discover -s tests

uv pip install coverage==7.8.0
coverage run --branch -m unittest discover -s tests
coverage report -m
coverage html
open htmlcov/index.html  # MAC
xdg-open htmlcov/index.html  # Linux
start htmlcov\index.html  # Windows
coverage erase

📄 许可证

本项目采用 Apache License, Version 2.0 许可证。

  • 0 关注
  • 0 收藏,7 浏览
  • system 提出于 2025-09-30 04:03

相似服务问题