Skip to main content
Glama
ntanhprt

pshare-share-mcp

by ntanhprt

pshare-share-mcp

MCP-сервер, позволяющий любому ИИ (Claude Code, Claude Desktop или другому MCP-клиенту) загружать файлы/папки на Pshare и получать ссылку для обмена — точно так же, как при ручном действии: загрузка через UI, затем нажатие кнопки Share для копирования ссылки.

Никакой авторизации/токенов не требуется — это согласуется с текущей архитектурой Pshare (сам веб-клиент тоже не выполняет реальную аутентификацию, используя лишь автоматически генерируемый X-Browser-Id).

Требование: уже должен быть запущен экземпляр Pshare где-либо (localhost или в LAN) — этот репозиторий является лишь MCP-сервером, вызывающим REST API Pshare, и не запускает Pshare самостоятельно.

Предоставляемые инструменты

pshare_upload

поле

обязательно

описание

paths

✅

массив абсолютных путей (файл или папка) на машине, где запущен MCP-сервер. Папки загружаются рекурсивно с сохранением структуры вложенных каталогов.

title

❌

заголовок, отображаемый на карточке обмена

senderName

❌

имя отправителя, отображаемое получателю

password

❌

пароль для открытия ссылки обмена

description

❌

описание, отображаемое на карточке обмена

ttlMinutes

❌

срок жизни ссылки в минутах; пусто = без срока действия

Результат: ссылка обмена вида http://<pshare-host>/?share=<N> с количеством файлов и статусом пароля.

Файлы > 90 МБ автоматически переключаются на чанковую загрузку (как при LAN-загрузке веб-клиента), дополнительных действий не требуется.

Related MCP server: vnsh-mcp

Установка

Достаточно клонировать этот репозиторий — скачивать весь Pshare не нужно:

git clone https://github.com/ntanhprt/Pshare-mcp.git
cd Pshare-mcp
pnpm install
pnpm build      # biên dịch ra dist/

Конфигурация (переменные окружения)

переменная

по умолчанию

описание

PSHARE_BASE_URL

http://localhost:5173

URL сервера Pshare, к которому MCP будет обращаться для загрузки/обмена

PSHARE_MCP_HOST

0.0.0.0

хост привязки при работе HTTP-транспорта

PSHARE_MCP_PORT

7317

порт при работе HTTP-транспорта

PSHARE_MCP_ALLOWED_HOSTS

(не задано)

список разрешённых хостов через запятую, используется для включения защиты от DNS-rebinding при привязке 0.0.0.0

localhost корректен только если MCP-сервер запущен на той же машине, где работает Pshare. localhost всегда указывает на «саму машину, где запущен процесс» — поэтому если вы устанавливаете этот MCP на другой машине/ноутбуке (даже в той же LAN), чем машина с Pshare, обязательно замените его на реальный IP машины с Pshare. Например, если Pshare работает на машине с IP 192.168.3.7:

PSHARE_BASE_URL=http://192.168.3.7:5173 claude mcp add pshare-share -- node "$(pwd)/dist/index.js"

Оставляйте значение localhost по умолчанию только если вы запускаете MCP (stdio) прямо на той же машине, где работает Pshare.

Автономный пробный запуск

# stdio (mặc định)
pnpm start

# HTTP/SSE — AI ở máy khác trong LAN cũng gọi được
pnpm start:http
# → nghe tại http://<PSHARE_MCP_HOST>:<PSHARE_MCP_PORT>/mcp

Руководство по интеграции для других разработчиков

1. Использование с Claude Code (транспорт stdio — рекомендуется, когда ИИ работает на той же машине/хосте, что и Pshare)

После клонирования и сборки (см. раздел «Установка» выше), из каталога Pshare-mcp:

claude mcp add pshare-share -- node "$(pwd)/dist/index.js"

Чтобы указать Pshare на другой машине, передайте env через -e (см. примечание о localhost в разделе «Конфигурация»):

claude mcp add pshare-share \
  -e PSHARE_BASE_URL=http://192.168.3.7:5173 \
  -- node "$(pwd)/dist/index.js"

Проверка регистрации:

claude mcp list

2. Использование с Claude Desktop (транспорт stdio)

Откройте файл конфигурации (~/Library/Application Support/Claude/claude_desktop_config.json на macOS, %APPDATA%\Claude\claude_desktop_config.json на Windows) и добавьте:

{
  "mcpServers": {
    "pshare-share": {
      "command": "node",
      "args": ["/đường/dẫn/tuyệt/đối/tới/Pshare-mcp/dist/index.js"],
      "env": {
        "PSHARE_BASE_URL": "http://localhost:5173"
      }
    }
  }
}

Перезапустите Claude Desktop, чтобы получить инструмент pshare_upload.

3. Использование через HTTP/SSE (когда ИИ работает на другой машине в той же LAN)

Запустите MCP-сервер на машине, где размещён Pshare (или на любой машине, которая может обращаться к Pshare):

PSHARE_BASE_URL=http://localhost:5173 pnpm start:http

На клиентской машине (Claude Code или любой MCP-клиент, поддерживающий HTTP-транспорт) укажите:

http://<IP-máy-chạy-mcp>:7317/mcp

Пример с Claude Code:

claude mcp add --transport http pshare-share http://192.168.3.7:7317/mcp

4. Использование с любым другим ИИ/агентным фреймворком

MCP — это стандартный протокол JSON-RPC — любой MCP-клиент (LangChain MCP adapter, custom agent и т.д.) может подключиться, достаточно:

  • stdio: запустить команду node dist/index.js и общаться через stdin/stdout.

  • HTTP: вызывать POST http://<host>:<port>/mcp согласно спецификации Streamable HTTP transport от MCP.

Замечания по безопасности

Этот MCP-сервер не выполняет аутентификацию — любой, кто может к нему обратиться (через stdio при наличии прав на запуск процесса, или через HTTP при доступе к host:port), может загружать/делиться файлами на реальном Pshare. Это согласуется с самим Pshare (нет аутентификации в API загрузки/обмена), но следует учитывать при открытии HTTP-транспорта наружу в LAN.

Available Tools

1 tool
pshare_uploadUpload to Pshare and get a share linkA

Uploads one or more files/folders from this machine to Pshare (LAN file sharing) and returns the same share link a user would get by uploading through the UI and clicking "Share".

ParametersJSON Schema
NameRequiredDescriptionDefault
pathsYesAbsolute file or folder paths on this machine to upload. Folders are uploaded recursively.
titleNoTitle shown on the share card
passwordNoPassword required to open the share link
senderNameNoName of the sender shown to recipients
ttlMinutesNoMinutes until the share expires; omit for no expiry
descriptionNoDescription shown on the share card

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It clearly states the upload side-effect and the nature of the return value, but it does not disclose potential caveats such as file size limits, authentication requirements, or whether an existing share is reused or a new one is created. The UI-equivalence note adds value, but behavioral disclosure remains basic.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that immediately states the action and outcome. Every phrase earns its place, and there is zero filler or repetition of schema field names.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema, so the description's mention of the returned share link is valuable for understanding what to expect. With six parameters well-documented in the schema and a straightforward purpose, the description is complete enough for an agent to use the tool, though it could add edge-case behavior (e.g., handling of inaccessible paths).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the description rightfully leaves parameter details to the schema. The only parameter-related hint in the description is 'one or more files/folders', which mirrors the 'paths' array. This adds no meaning beyond the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Uploads'), a clear resource ('one or more files/folders from this machine to Pshare'), and a concrete outcome ('returns the same share link a user would get'). It fully distinguishes the tool's purpose even without sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context by equating the tool's output to the UI 'Share' action, implying when to use it: whenever a user would upload files via the Pshare interface. It does not explicitly mention exclusions or alternatives, but with no sibling tools, this is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • First observedpshare_upload

TDQS

A3.9/5.0

Scored across 1 tool

Disambiguation5/5

With only a single tool, there is no possibility of confusion or overlap. The tool's purpose is clearly unique by virtue of being the only one.

Naming Consistency5/5

A single tool name cannot be inconsistent with itself. 'pshare_upload' uses a clear prefix plus verb structure, and there are no other names to compare against.

Tool Count2/5

A one-tool server for a file-sharing service feels too thin. While the tool covers the upload action, the apparent scope of 'share' implies at least download or retrieval functionality, making a single tool insufficient.

Completeness2/5

The tool surface is severely limited to uploading. There are no tools for downloading, listing, deleting, or managing shares, which means agents have no way to complete a full sharing workflow.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    Enables AI assistants to manage Microsoft SharePoint documents and folders through natural language, supporting operations like listing, reading, uploading, updating, deleting, and creating Office files.
    13
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables sharing and reading encrypted files (text, images, logs) for AI workflows, with automatic 24-hour expiration and host-blind security.
    74 npm
    156
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to securely transfer files between machines via encrypted, expiring share links, with tools for upload, download, status checks, and link management.
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    Enables AI agents and users to upload and download files via MCP, generating shareable links and identifier codes. Files are automatically deleted after 24 hours.
    9
    -