Cover image
Try Now
2025-03-23

Servidor para acessar e manipular arquivos locais usando MCP

3 years

Works with Finder

1

Github Watches

1

Github Forks

0

Github Stars

MCP Local File Server

Servidor para acessar e manipular arquivos locais usando MCP (Managed Control Panel).

Instalação

  1. Clone o repositório:
git clone https://github.com/fmorus/mcp-local-file-server.git
cd mcp-local-file-server
  1. Instale as dependências:
npm install
  1. 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 campo file

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.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • momi
  • Provides initial medical assessments and advice.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Daren White
  • A supportive coach for mastering all Spanish tenses.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • huahuayu
  • A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.

  • deemkeen
  • control your mbot2 with a power combo: mqtt+mcp+llm

  • zhaoyunxing92
  • 本项目是一个钉钉MCP(Message Connector Protocol)服务,提供了与钉钉企业应用交互的API接口。项目基于Go语言开发,支持员工信息查询和消息发送等功能。

  • justmywyw
  • Short and sweet example MCP server / client implementation for Tools, Resources and Prompts.

  • KasarLabs
  • Build powerful and secure AI Agents powered by Starknet.

    Reviews

    4 (1)
    Avatar
    user_h4TQke2d
    2025-04-15

    As a devoted MCP application user, I highly recommend mysql-mcp-server by MCP-Mirror. This server offers excellent performance and stability for database management. The seamless integration and easy-to-navigate interface make it a top choice for developers. For more details, visit: https://mcp.so/server/Mineru98_mysql-mcp-server/MCP-Mirror