mcplocal
mcplocal
Servidor MCP de archivos locales que permite a un cliente compatible con MCP (incluidas las aplicaciones MCP personalizadas de ChatGPT Web cuando estén disponibles) leer, buscar y modificar archivos dentro de un directorio configurado explícitamente.
Características
HTTP+SSE heredado:
GET /sse+POST /messagesPunto de conexión HTTP MCP moderno:
/mcpComprobación de estado:
/healthSandbox: cada ruta de archivo se resuelve dentro de
MCP_ROOTAutenticación Bearer opcional
Herramientas de lectura/búsqueda para el descubrimiento de proyectos
Herramientas de escritura/edición para flujos de trabajo de codificación
El borrado está deshabilitado por defecto
Sin herramienta de ejecución de shell/CLI
Sin dependencia de una base de datos externa
Node.js 20+
El SDK de TypeScript de MCP recomienda actualmente Streamable HTTP para servidores remotos y trata HTTP+SSE como un transporte de compatibilidad hacia atrás. Este proyecto expone intencionadamente ambos para que los clientes SSE más antiguos puedan seguir conectándose mientras que los clientes más nuevos puedan usar /mcp.
Related MCP server: FilesystemMCP
1. Ejecutar
cp .env.example .env
# edit MCP_ROOT if needed
npm startEjemplo:
MCP_ROOT=~/Projects
MCP_HOST=127.0.0.1
MCP_PORT=8008
MCP_AUTH_TOKEN=change-meLuego:
SSE: http://127.0.0.1:8008/sse
Streamable: http://127.0.0.1:8008/mcp
Health: http://127.0.0.1:8008/health2. A qué puede conectarse ChatGPT Web
ChatGPT Web no puede acceder directamente a localhost desde el servicio alojado. Un servidor MCP local debe hacerse accesible a través del mecanismo compatible de Secure MCP Tunnel/red privada. Después de tener un punto de conexión MCP remoto, agrégalo como una aplicación MCP personalizada en el modo de desarrollador de ChatGPT, escanea sus herramientas y actívalo.
Para un túnel que asigne el servicio local, el origen local es:
http://127.0.0.1:8008/sseo, para clientes modernos:
http://127.0.0.1:8008/mcpNo expongas este servidor a Internet público sin autenticación y una política de red explícita.
3. Herramientas expuestas a ChatGPT
list_files(path, recursive)read_file(path, startLine, endLine)write_file(path, content, createDirs)edit_file(path, oldText, newText, replaceAll)search_files(query, path, regex, caseSensitive, maxResults)create_directory(path)file_info(path)delete_file(path)solo cuandoMCP_ENABLE_DELETE=true
Flujo de trabajo de codificación típico:
list_filespara entender el proyecto.search_filespara localizar símbolos.read_filepara inspeccionar el código relevante.edit_filepara un cambio quirúrgico, owrite_filepara un archivo nuevo.read_filede nuevo para verificar el resultado.
4. Modelo de seguridad
MCP_ROOT es el límite estricto. Se rechazan los recorridos ../ y las rutas absolutas fuera de él. Los archivos binarios/ilegibles se omiten en la búsqueda. El tamaño de los archivos está limitado por MCP_MAX_FILE_BYTES.
El servidor no expone intencionadamente la ejecución arbitraria de shell. Eso significa que ChatGPT puede editar código pero no puede ejecutar automáticamente rm, curl, gestores de paquetes, comandos git ni programas arbitrarios a través de este MCP.
Para una máquina de desarrollo, mantén MCP_HOST=127.0.0.1 y usa el Secure MCP Tunnel compatible en lugar de vincular el servidor a todas las interfaces.
5. Compilar
npm run build
node dist/server.jsLa compilación no tiene dependencias y copia el tiempo de ejecución en dist/.
6. Docker
docker build -t mcplocal .
docker run --rm -p 8008:8008 -v "$PWD:/workspace" mcplocal7. Ejemplos de indicaciones en ChatGPT
Inspect this local project and tell me where the authentication flow is implemented. Do not modify anything.Open src/server.js and refactor the error handling. Before changing it, read the relevant code. Then edit only the necessary section and show me what changed.Search the project for TODO comments and create a report at reports/todos.md.Licencia
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA secure MCP server enabling read-only access and file search capabilities within a specified directory, while respecting .gitignore patterns.
- AlicenseNot gradedqualityCmaintenanceA local, customizable MCP server for filesystem access that extends the official Anthropic implementation with additional tools and functionality. It enables users to securely read, write, edit, and manage files and directories within specific allowed local paths.529,343Inno Setup
- FlicenseBqualityDmaintenanceA lightweight MCP server for basic file operations, enabling reading, writing, and listing files securely via the Model Context Protocol.31
- AlicenseNot gradedqualityBmaintenanceSafe local MCP server for Windows to list, read, search, patch, backup, and verify code files in allowed folders, with Git integration and dry-run diffs.1MIT
Related MCP Connectors
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
A MCP server built for developers enabling Git based project management with project and personal…
An MCP server that gives your AI access to the source code and docs of all public github repos
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aiautotool/mcplocal'
If you have feedback or need assistance with the MCP directory API, please join our Discord server