MCPFileSystem_Client

by Digio-Campus

193 downloads
Not rated
GitHub

About

MCPFileSystemClient is a client application that connects a local LLM (compatible with the OpenAI SDK) to the MCP filesystem server, allowing the model to read and write files in specified directories. It is intended for developers who want to give an LLM controlled access to…

Details

Author
Digio-Campus
Downloads
193
Categories
Other

- Connects an OpenAI‑compatible LLM to the filesystem via MCP.
- Restricts file access to directories specified in app.js.
- Uses StdioClientTransport with the official MCP filesystem server.
- Configured via environment variables (model, prompt, base URL).
- Requires a model that supports tool/function calling.

1. Start a local LLM that supports the OpenAI SDK (e.g., Jan).
2. Edit the .env file to set the model name, system prompt, and server base URL (defaults are provided).
3. Run node app.js.

USO

1. Iniciar llm en un servidor local, debe ser compatible con el SDK de OpenAi. Puedes usar Jan para esto.
2. Modificar .env para incluir el modelo que se está usando, el prompt y la url base del servidor (está puesta por defecto)
3. Ejecutar el comando ``node app.js


CONSIDERACIONES

1. El programa solo tendrá acceso a los directorios especificados (por defecto files). Se puede modificar en app.js en la declaración del servidor mcp

EJ ln.20
const transport = new StdioClientTransport({
command: "npx",
args: [
"-y",
"@modelcontextprotocol/server-filesystem",
"ruta",
"otra ruta",
...
],
});
``
2. El modelo especificado por defecto en .env no funcionará correctamente, es necesario un modelo con la función de tool calling.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.