TypeScript MCP with Filesystem Server and Ollama Integration
@ausboss
About TypeScript MCP with Filesystem Server and Ollama Integration
A TypeScript example showcasing the integration of Ollama with the Model Context Protocol (MCP), specifically the Filesystem MCP Server. This project provides an interactive command-line interface for an AI agent that can utilize filesystem tools.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"@modelcontextprotocol/server-filesystem",
"./"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is TypeScript MCP with Filesystem Server and Ollama Integration?
This project demonstrates how to interact with a Model Context Protocol (MCP) server using TypeScript, focusing on the Filesystem MCP Server. It provides an example of integrating this setup with Ollama to create an AI agent capable of interacting with your local file system.
How to use TypeScript MCP with Filesystem Server and Ollama Integration?
Install Node.js (≥18), Ollama, and globally install the Filesystem MCP Server. Clone the repository, run npm install, configure mcp-config.json with server and model details, then execute npm run start to start an interactive chat session.
Key features of TypeScript MCP with Filesystem Server and Ollama Integration
- MCP client implementation using the official TypeScript SDK.
- Filesystem interaction like listing directories and reading files.
- Ollama integration for an AI agent with tool calling.
- Interactive command‑line chat interface.
- Configuration‑driven setup via
mcp-config.json.
Use cases of TypeScript MCP with Filesystem Server and Ollama Integration
- Exploring directory contents through natural language prompts.
- Reading file contents using an AI‑powered agent.
- Automating file system tasks with local LLM tool calling.
- Prototyping MCP server interactions in a TypeScript project.
FAQ from TypeScript MCP with Filesystem Server and Ollama Integration
What runtime and dependencies are required?
Node.js (version 18 or higher), npm or yarn, and the globally installed package @modelcontextprotocol/server-filesystem are required. Ollama must be installed and running.
How do I configure filesystem access?
Edit the mcp-config.json file; the args field for the filesystem server specifies the root directory the agent can access (e.g., "./"). Adjust this path carefully to limit access.
Does the Ollama model need to support tool calling?
Yes. The specified Ollama model must support the concept of “tools” or “functions” in its API. Models like qwen2.5:latest often have this capability.
How do I run the interactive agent?
Run npm run start or yarn start. This starts the Filesystem MCP Server, connects to it, fetches tools, initializes the Ollama agent, and opens a chat session.
Can I contribute to this project?
Yes. Submit pull requests with improvements or bug fixes. For major changes, open an issue first to discuss the proposed change.
Frequently asked questions
What runtime and dependencies are required?
Node.js (version 18 or higher), npm or yarn, and the globally installed package `@modelcontextprotocol/server-filesystem` are required. Ollama must be installed and running.
How do I configure filesystem access?
Edit the `mcp-config.json` file; the `args` field for the filesystem server specifies the root directory the agent can access (e.g., `"./"`). Adjust this path carefully to limit access.
Does the Ollama model need to support tool calling?
Yes. The specified Ollama model must support the concept of “tools” or “functions” in its API. Models like `qwen2.5:latest` often have this capability.
How do I run the interactive agent?
Run `npm run start` or `yarn start`. This starts the Filesystem MCP Server, connects to it, fetches tools, initializes the Ollama agent, and opens a chat session.
Can I contribute to this project?
Yes. Submit pull requests with improvements or bug fixes. For major changes, open an issue first to discuss the proposed change.
Basic information
More AI & Agents MCP servers
MCP-LLM Bridge
patruffBridge between Ollama and MCP servers, enabling local LLMs to use Model Context Protocol tools
MCP Server - Remote MacOs Use
baryhuangThe only general AI agent that does NOT requires extra API key, giving you full control on your local and remote MacOs from Claude Desktop App
mcp-hfspace MCP Server 🤗
evalstateMCP Server to Use HuggingFace spaces, easy configuration and Claude Desktop mode.
Solon Ai
opensolonJava AI application development framework (supports LLM-tool,skill; RAG; MCP; Agent-ReAct,Team-Agent). Compatible with java8 ~ java25. It can also be embedded in SpringBoot, jFinal, Vert.x, Quarkus, and other frameworks.
Just Prompt - A lightweight MCP server for LLM providers
dislerjust-prompt is an MCP server that provides a unified interface to top LLM providers (OpenAI, Anthropic, Google Gemini, Groq, DeepSeek, and Ollama)
Comments