mcp-local-file-server
MCP Local File Server is a server for accessing and manipulating local files using MCP (Managed Control Panel).
MCP Local File Server
Servidor para acessar e manipular arquivos locais usando MCP (Managed Control Panel).
Instalação
- Clone o repositório:
git clone https://github.com/fmorus/mcp-local-file-server.git
cd mcp-local-file-server
- Instale as dependências:
npm install
- Inicie o servidor:
npm start
O servidor estará rodando em http://localhost:3000
API Endpoints
Listar Arquivos
- GET
/files?dir={diretório}
- Lista todos os arquivos em um diretório
- O parâmetro
dir
é opcional (padrão: diretório atual)
Ler Arquivo
- GET
/file?path={caminho_do_arquivo}
- Lê o conteúdo de um arquivo
Upload de Arquivo
- POST
/file
- Faz upload de um arquivo
- Use
multipart/form-data
com o campofile
Atualizar Arquivo
- PUT
/file
- Atualiza o conteúdo de um arquivo
- Body:
{ "path": "caminho_do_arquivo", "content": "novo_conteudo" }
Deletar Arquivo
- DELETE
/file?path={caminho_do_arquivo}
- Remove um arquivo ou diretório
Exemplo de Uso
// Listar arquivos
fetch('http://localhost:3000/files')
.then(response => response.json())
.then(files => console.log(files));
// Ler arquivo
fetch('http://localhost:3000/file?path=/caminho/do/arquivo.txt')
.then(response => response.json())
.then(data => console.log(data.content));
// Upload de arquivo
const formData = new FormData();
formData.append('file', arquivoParaUpload);
fetch('http://localhost:3000/file', {
method: 'POST',
body: formData
});
// Atualizar arquivo
fetch('http://localhost:3000/file', {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
path: '/caminho/do/arquivo.txt',
content: 'Novo conteúdo'
})
});
// Deletar arquivo
fetch('http://localhost:3000/file?path=/caminho/do/arquivo.txt', {
method: 'DELETE'
});
Segurança
⚠️ Atenção: Este servidor tem acesso total aos arquivos do sistema. Use com cautela e apenas em ambientes confiáveis.
Related MCP Servers
View all file_systems servers →Filesystem MCP Server
by modelcontextprotocol
Node.js server implementing Model Context Protocol (MCP) for filesystem operations.
markdownify-mcp
by zcaceres
Markdownify is a Model Context Protocol (MCP) server that converts various file types and web content to Markdown format.
edgeone-pages-mcp
by TencentEdgeOne
An MCP service for deploying HTML content, folder, and zip file to EdgeOne Pages and obtaining a publicly accessible URL.
DesktopCommanderMCP
by wonderwhy-er
Desktop Commander MCP is a tool that allows users to search, update, manage files, and run terminal commands using AI, without incurring API token costs.
mcp-obsidian
by MarkusPfundstein
MCP server to interact with Obsidian via the Local REST API community plugin.
excel-mcp-server
by haris-musa
A Model Context Protocol (MCP) server that lets you manipulate Excel files without needing Microsoft Excel installed.
mcp-obsidian
by smithery-ai
The Obsidian Model Context Protocol (MCP) is a connector that allows Claude Desktop or any MCP client to read and search directories containing Markdown notes, such as an Obsidian vault.