drio
Open app

TypeScript MCP with Filesystem Server and Ollama Integration

Source

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.

Catalog onlyCatalog onlySTDIO

Overview

MCP Ollama Agent is a TypeScript project that integrates the Model Context Protocol (MCP) with Ollama, providing an interactive command-line interface for an AI agent that can utilize filesystem tools.

To use the MCP Ollama Agent, clone the repository, install the necessary dependencies, configure the mcp-config.json file, and run the application to start interacting with the AI agent via the command line.

  • MCP Client Implementation: Connects to an MCP server using TypeScript. - Filesystem Interaction: Allows operations like listing directories and reading files. - Ollama Integration: Utilizes Ollama as an AI agent to process prompts and interact with the filesystem. - Tool Calling: Enables the AI agent to request functionalities from the MCP server. - Interactive Chat Interface: Provides a command-line interface for user interaction.
  1. Managing files and directories through an AI interface.
  2. Automating filesystem tasks using natural language commands.
  3. Exploring directory structures and file contents interactively.

Add to your AI client

Use these steps to connect TypeScript MCP with Filesystem Server and Ollama Integration in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-ollama-agent-ausboss": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-ollama-agent-ausboss"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-ollama-agent-ausboss": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-ollama-agent-ausboss"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-ollama-agent-ausboss": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-ollama-agent-ausboss"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-ollama-agent-ausboss": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-ollama-agent-ausboss"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-ollama-agent-ausboss": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-ollama-agent-ausboss"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-ollama-agent-ausboss": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-ollama-agent-ausboss"
      ]
    }
  }
}

FAQ

Can MCP Ollama Agent work with any filesystem?

Yes! It can interact with any filesystem accessible to the MCP server.

Is there a graphical interface available?

No, the current implementation is command-line based.

What are the prerequisites for running this project?

You need Node.js, npm or yarn, and Ollama installed, along with the Filesystem MCP Server.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":558,"uuid":"b63d6a68-1f95-4b3d-9a11-5e4254909fcc","name":"mcp-ollama-agent","title":"TypeScript MCP with Filesystem Server and Ollama Integration","description":"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.","avatar_url":"https://avatars.githubusercontent.com/u/102309304?v=4","created_at":"2024-12-30T02:55:56.903Z","updated_at":"2025-02-23T07:15:15.369Z","status":"created","author_name":"ausboss","author_avatar_url":"https://avatars.githubusercontent.com/u/102309304?v=4","tags":"agent,ollama,ollama-tools,mcp-server,mcp-client,mcp-agent","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/ausboss/mcp-ollama-agent","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":null,"user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]