返回市场
本地_mcp客户端

本地_mcp客户端

作者:mytechnotalent5 星标更新:2025-04-24

项目介绍

本地MCP客户端

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

<br>

第一步a:创建虚拟环境并安装依赖项 - 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

第一步b:创建虚拟环境并安装依赖项 - 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

第二步a:安装Ollama并拉取LLM模型 - MAC

brew install ollama
ollama serve
ollama pull llama3:8b

第二步b:安装Ollama并拉取LLM模型 - Linux

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

第二步c:安装Ollama并拉取LLM模型 - Windows

下载Ollama 这里

ollama serve
ollama pull llama3:8b

第三步a:克隆MCP服务器 - MAC/Linux

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

第三步b:克隆MCP服务器 - Windows

cd "$HOME\Documents"
git clone https://github.com/mytechnotalent/MalwareB

第四步:运行Ollama

ollama serve

第五步a:运行MCP客户端 - MAC/Linux

export BNJLAT="<your-binja-api-token>"
uv run local_mcp_client.py

第五步b:运行MCP客户端 - Windows

$env:BNJLAT = "<your-binja-api-token>"
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
<br>

许可证

Apache许可证,第2.0版