Skip to content

A minimal Model Context Protocol (MCP) server and client for file system operations using Ollama(LLM).

License

ShashidharNagaral/mcp-fs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP-FS (Model Context Protocol – File System)

A prototype toolhost that enables LLMs to perform basic file system operations through MCP over HTTP.

Features

  • createFile – Create new files
  • readFile – Read file content
  • updateFile – Overwrite file content
  • appendToFile – Append text to a file
  • deleteFile – Delete files
  • listFiles – List contents of a directory
  • describeServer – Returns server tool list & usage guide

Architecture

  • Server: Exposes tools via MCP HTTP transport using Express and @modelcontextprotocol/sdk.
  • Client: Connects to MCP, fetches tool list, routes user input to an LLM (e.g., Ollama), and invokes tools based on LLM output.

Install & Run Ollama

MCP-FS uses Ollama to run local LLMs and respond to file system tool requests.
Ollama allows you to run models like mistral, llama2, codellama, and others locally via a simple API.
Official GitHub: ollama/ollama

Install Ollama

  • macOS: Download

  • Windows: Download

  • Linux:

    curl -fsSL https://ollama.com/install.sh | sh

Start Ollama Server

ollama serve

By default, Ollama runs at http://localhost:11434.

Pull Required Model

ollama pull mistral-nemo

Check Installation

Should list available models (confirming Ollama is up and the model is installed):

curl http://localhost:11434/api/tags

Installation & Setup Project

Clone the repo

git clone https://github.com/your-username/mcp-fs.git
cd mcp-fs

Install dependencies

npm install

Start the MCP Server

npm run server

Start the MCP Client

npm run client

Resources

About

A minimal Model Context Protocol (MCP) server and client for file system operations using Ollama(LLM).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published