Token导航 LogoToken导航TokenDH.com
Lfm2 5 Local logo
AI代理stdio官方级别未说明来源级核验

Lfm2 5 Local

MCP Server

LFM2.5是一款本地运行的AI聊天与MCP服务器工具,支持在Apple Silicon Mac上运行,提供高效的聊天界面和MCP集成,适用于开发者和AI研究者。

工具数

4

提示词数

0

GitHub Stars

1

资源数

0
本地AIPythonClaude聊天界面Claude DesktopClaudeCursor

安装说明

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

作者 / 组织

WispAyr

提供方

WispAyr

最后核验

2026/5/17 20:20

快速接入

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

命令预览

pip install mlx-lm

详细介绍

LFM2.5——设备上AI聊天和MCP服务器

Liquid AI的LFM2.5-1.2B-说明书 在Mac上本地建模,具有漂亮的聊天界面和MCP集成,可用于Claude Desktop、Cursor和OpenClaw等工具。

苹果硅上约120 tok/s · 4台Mac的传输速度约为480 tok/s · 1.5GB内存 · 100%私人&离线

✨ 特性

  • 🖥️ 漂亮的聊天界面 --深色主题、响应式聊天界面,带有markdown渲染、代码突出显示和实时性能指标
  • MLX加速 --通过8位量化的MLX在Apple Silicon上原生运行
  • 🔌 MCP服务器 --将LFM2.5作为Claude Desktop、Cursor、OpenClaw和任何MCP兼容客户端的工具公开
  • 🔀 多Mac集群 --通过自动负载平衡和故障转移在多台M4 Mac上分发推理
  • 📊 实时统计数据 --实时显示令牌计数、生成速度(tok/s)和响应时间
  • 🎯 快速提示 --常见任务的预构建提示(CRISPR解释、代码架构、创意写作、数据分析)

🏗️ 建筑

Single-Mac Mode:
  Client → MLX Server (:8080)

Cluster Mode (4× throughput):
  Client → Cluster LB (:5200) → Mac 1 MLX (:8080)
                               → Mac 2 MLX (:8080)
                               → Mac 3 MLX (:8080)
                               → Mac 4 MLX (:8080)

🚀 快速开始

先决条件

  • 带苹果硅(M1/M2/M3/M4)的macOS
  • Python 3.10+

1.安装

# Clone the repo
git clone https://github.com/WispAyr/LFM2.5-local.git
cd LFM2.5-local

# Install MLX dependencies (if needed)
pip install mlx-lm

# Install MCP dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

2.跑步

# Just the MLX server + chat UI
./start_server.sh

# MLX + MCP server (for Claude Desktop, Cursor, OpenClaw)
./start_server.sh --mcp

# Everything (MLX + MCP + web UI)
./start_server.sh --all

# Multi-Mac cluster (MLX + Load Balancer + MCP + web UI)
./start_server.sh --cluster

3.打开

服务URL描述
聊天界面http://localhost:3000网络聊天界面
API MLXhttp://localhost:8080/v1兼容OpenAI的API
集群LBhttp://localhost:5200/v1负载平衡API(集群模式)
群集状态http://localhost:5200/cluster/status实时节点运行状况
MCP服务器http://localhost:5100/mcpMCP协议端点

🔌 MCP集成

MCP服务器公开LFM2.5作为任何MCP兼容客户端都可以调用的工具。

工具

工具说明
chat通用聊天——提问、推理、写作
summarize用可配置的长度总结文本
analyze_code代码审查、错误检测、建议
translate将文本翻译成任何语言

资源

URI描述
lfm25://model/info模型架构、规格、功能
lfm25://server/status实时MLX服务器连接状态

提示

提示描述
code_review结构化代码审查模板
explain_conceptELI5风格概念说明

连接到克劳德桌面

添加 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "lfm25": {
      "command": "/path/to/LFM2.5-local/.venv/bin/python3",
      "args": ["/path/to/LFM2.5-local/mcp_server.py"]
    }
  }
}

连接到光标

设置→ MCP服务器→ 添加并粘贴相同的配置。

连接到OpenClaw

指向 http://localhost:5100/mcp 作为MCP服务器端点。

📁 项目结构

├── index.html            # Chat web UI (single-file, no build step)
├── mcp_server.py         # FastMCP server with tools, resources, prompts
├── cluster.py            # Multi-Mac cluster load balancer
├── cluster_config.json   # Cluster node configuration
├── server.py             # Web UI proxy server (serves static + proxies API)
├── mcp_config.json       # MCP config template for Claude Desktop / Cursor
├── start_server.sh       # Launcher script (--mcp, --all, --cluster flags)
├── demo_lfm25.py         # Python demo script
└── requirements.txt      # Python dependencies

🔀 多Mac集群

在多台M4 Mac上分发推理 ~480tok/s的综合吞吐量 以及自动故障转移。

设置

1.在每台Mac上,启动MLX服务器:

pip install mlx-lm
python3 -m mlx_lm.server --model LiquidAI/LFM2.5-1.2B-Instruct-MLX-8bit --port 8080 --host 0.0.0.0

2.编辑 cluster_config.json 在主Mac上使用每个节点的IP:

{
  "nodes": [
    {"name": "Mac-1", "host": "192.168.1.10", "port": 8080, "weight": 1},
    {"name": "Mac-2", "host": "192.168.1.11", "port": 8080, "weight": 1},
    {"name": "Mac-3", "host": "192.168.1.12", "port": 8080, "weight": 1},
    {"name": "Mac-4", "host": "192.168.1.13", "port": 8080, "weight": 1}
  ]
}

3.启动集群:

./start_server.sh --cluster

特性

  • 负载最小的路由 对于POST请求,GET采用轮转
  • 健康检查 每5秒进行一次自动故障切换
  • SSE流媒体 passthrough用于实时令牌生成
  • 节点权重 优先考虑更快的Mac
  • 状态仪表板/cluster/status 每个节点的度量

🧠 关于LFM2.5

LFM2.5是 不是变压器这是一种混合架构 液态AI 结合:

  • 10×门控短卷积 图层--快速顺序处理
  • 6×分组查询注意力 层次——选择性注意

这赋予了它独特的性能:极快的推理速度(在M系列Mac上约为120+tok/s),参数占用空间较小,为1.17B。

规格
参数1.17B
图层16
上下文32K令牌
词汇表65536
培训28T代币
量化8位(MLX)

📄 许可证

麻省理工学院

🔗 链接

目录标签

目录标签

本地AIPythonClaude聊天界面本地部署MCP集成AppleSilicon高效推理

支持客户端

Claude DesktopClaudeCursor

接入字段

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

stdio

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

none

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

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

0

权限和风险

stdionone部署方式未说明

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

安装前确认

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

来源信息

继续浏览同类 MCP