Sponsored by Deepsite.site

Mcp Smb Server

Created By
natan042 days ago
Overview

MCP SMB Server

A runtime file-access gateway for AI agents using the Model Context Protocol (MCP).

This project allows AI agents to access SMB/CIFS shares or local filesystem paths at runtime, while preserving native filesystem permission enforcement.

If the underlying system cannot read a file, the agent cannot read it either.


What this project is not

  • ❌ No filesystem indexing
  • ❌ No embeddings or vector databases
  • ❌ No data sync or pre-copy
  • ❌ No permission bypass
  • ❌ No IAM or policy engine

What it does

  • ✅ Exposes files only at access time
  • ✅ Relies on native SMB / OS permission enforcement
  • ✅ Uses MCP as a runtime control plane
  • ✅ Supports SMB and local filesystem backends
  • ✅ Communicates over stdio (VS Code / agent friendly)

Why this exists

Most AI file integrations follow this pattern:

Filesystem → Sync → Index → Embed → Agent

This breaks permission models and makes revocation impossible.

This project instead does:

Agent → MCP → Runtime filesystem access → Native permission check

No indexing. No duplication. No policy reimplementation.


Backends

Local mode

  • Accesses local directories
  • Restricted to configured base paths
  • Uses OS permissions

SMB mode

  • Accesses SMB/CIFS shares
  • Authorization handled by the SMB server
  • No credentials stored in config files

Available MCP tools

list_directory

Lists files and directories at a given path.

Arguments

  • path (string, required)

read_file

Reads a bounded portion of a file.

Arguments

  • path (string, required)
  • max_bytes (number, optional, default: 8192)

Configuration

Configuration is process-level, loaded once at startup.

For detailed configuration examples, see the Configuration Guide.

Quick Start:

# SMB mode with environment variables
export MCP_MODE=smb
export SMB_ADDR=localhost:445
export SMB_SHARE=finance
export SMB_AUTH=ntlm
export SMB_USER=alice
export SMB_PASSWORD=your_password
./mcp-smb-server
# Local mode with config file
./mcp-smb-server --config config.yaml

Architecture

MCP → FileBackend → { Local | SMB }

The server does not make authorization decisions.
All access decisions are made by the underlying filesystem or SMB server.


What this project intentionally does not include

  • Centralized policy management
  • Approval workflows
  • Cross-backend access rules
  • Audit aggregation

This project defines a minimal, correct execution boundary on top of which higher-level governance can be built.


Installation

Prerequisites

  • Go 1.24 or later
  • For SMB mode: Access to an SMB/CIFS server
  • For local mode: Appropriate filesystem permissions

Build

git clone <repository-url>
cd mcp-smb-server
go build -o mcp-smb-server ./cmd/server

License

Apache License 2.0

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
ChatWiseThe second fastest AI chatbot™
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
DeepChatYour AI Partner on Desktop
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Serper MCP ServerA Serper MCP Server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
WindsurfThe new purpose-built IDE to harness magic
Tavily Mcp
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Amap Maps高德地图官方 MCP Server
CursorThe AI Code Editor