Cover image
Try Now
2025-03-23

Servidor Para Acessar E手工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.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

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

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

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

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

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

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

  • Lists Tailwind CSS classes in monospaced font

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

    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