MCP.so
登录

TypeScript MCP with Filesystem Server and Ollama Integration

@ausboss

关于 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.

基本信息

分类

AI 与智能体

传输方式

stdio

发布者

ausboss

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "@modelcontextprotocol/server-filesystem",
        "./"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

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.

评论

AI 与智能体 分类下的更多 MCP 服务器