Token导航 LogoToken导航TokenDH.com
Server MCP Local logo
数据服务未说明官方级别未说明来源级核验

Server MCP Local

MCP Server

一个基于Node.js和Express的本地服务器,提供文件管理、SQLite查询、本地LLM文本生成、报告构建和聊天会话功能。

工具数

5

提示词数

0

GitHub Stars

0

资源数

0
报告生成本地LLMTypeScript

安装说明

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

作者 / 组织

Andyfer004

提供方

Andyfer004

最后核验

2026/5/17 20:19

快速接入

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

详细介绍

Server MCP Local

Servidor MCP local con Node.js + Express que expone endpoints para:

  • FS: leer y escribir archivos en directorios permitidos (docs/, reports/, data/).
  • SQLite: ejecutar consultas de solo lectura.
  • LLM local: generar texto y resúmenes usando llama.cpp.
  • Reportes: construir reportes en Markdown y PDF.
  • Chat local: sesiones de conversación persistentes.
  • Agente / Router: interpretar mensajes libres y mapearlos a acciones (read_file, write_file, summarize_file, etc.).

📦 Requisitos

  • Node.js v18+ (se probó con v23.11.0).
  • TypeScript (tsc) para compilar.
  • llama.cpp instalado con Homebrew.
  • Un modelo .gguf (ejemplo: tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf en carpeta models/).
  • Dependencias instaladas con:
npm install

⚙️ Configuración

Variables de entorno (pueden ir en .env):

API_TOKEN=dev-token
MCP_ALLOWED_DIRS=docs,reports,data
DB_PATH=./data/app.db
LLAMA_MODEL=./models/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf
LLAMA_BIN=/opt/homebrew/opt/llama.cpp/bin/llama-cli
PORT=3001

▶️ Levantar servidor

  1. Compilar TypeScript:
npm run build
  1. Ejecutar:
API_TOKEN=dev-token \
MCP_ALLOWED_DIRS=docs,reports,data \
DB_PATH=./data/app.db \
LLAMA_MODEL=./models/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf \
LLAMA_BIN=/opt/homebrew/opt/llama.cpp/bin/llama-cli \
PORT=3001 \
node dist/http.js
  1. El servidor quedará en:
http://127.0.0.1:3001

🔍 Endpoints principales

Health check

curl http://127.0.0.1:3001/health

FS

# Escribir
curl -X POST http://127.0.0.1:3001/fs/write \
  -H "Authorization: Bearer dev-token" \
  -H "Content-Type: application/json" \
  -d '{"path":"docs/demo.txt","content":"Hola Mundo"}'

# Leer
curl -X POST http://127.0.0.1:3001/fs/read \
  -H "Authorization: Bearer dev-token" \
  -H "Content-Type: application/json" \
  -d '{"path":"docs/demo.txt"}'

LLM

curl -X POST http://127.0.0.1:3001/llm/generate \
  -H "Authorization: Bearer dev-token" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"Dame 3 ventajas de un servidor MCP local"}'

Reporte

curl -X POST http://127.0.0.1:3001/report/build \
  -H "Authorization: Bearer dev-token" \
  -H "Content-Type: application/json" \
  -d '{"title":"Reporte de prueba","query":"demo","includeSummary":true}'

Chat

# Crear sesión
curl -X POST http://127.0.0.1:3001/chat/session \
  -H "Authorization: Bearer dev-token" \
  -H "Content-Type: application/json" \
  -d '{}'

# Enviar mensaje
curl -X POST http://127.0.0.1:3001/chat/send \
  -H "Authorization: Bearer dev-token" \
  -H "Content-Type: application/json" \
  -d '{"sessionId":"","message":"Explica MCP local"}'

目录标签

目录标签

报告生成本地LLMTypeScript文件管理本地部署SQLite查询聊天会话

接入字段

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

未说明

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

token

工具数量(toolCount,工具数)

5

资源数量(resourceCount,资源数)

0

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

0

权限和风险

未说明token部署方式未说明

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

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP