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.
Basic information
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.
More AI & Agents MCP servers
1MCP - One MCP Server for All
1mcp-appA unified Model Context Protocol server implementation that aggregates multiple MCP servers into one.
🛡️ A.I.G(AI-Infra-Guard)
TencentA full-stack AI Red Teaming platform securing AI ecosystems via OpenClaw Security Scan, Agent Scan, Skills Scan, MCP scan, AI Infra scan and LLM jailbreak evaluation.
Unreal Engine Generative AI Support Plugin
prajwalshettydevUnreal Engine plugin for LLM/GenAI models & MCP UE5 server. OpenAI GPT-5, Deepseek R1, Claude Opus/Sonnet, Gemini 3, Grok 4, Alibaba Qwen, Kimi, ElevenLabs TTS, Inworld, OpenRouter, Groq, GLM, Ollama, Local, Meshy, Tripo, Hunyuan3D, Rodin, fal, Dashscope, Seedream. NPC AI, agenti
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
21st.dev Magic AI Agent
21st-devIt's like v0 but in your Cursor/WindSurf/Cline. 21st dev Magic MCP server for working with your frontend like Magic
Comments