Skip to main content
Glama
ntanhprt

pshare-share-mcp

by ntanhprt

pshare-share-mcp

MCP 서버로 모든 AI(Claude Code, Claude Desktop 또는 기타 MCP 클라이언트)가 파일/폴더를 Pshare에 업로드하고 공유 링크를 받을 수 있게 해줍니다 — UI를 통해 업로드한 후 Share 버튼을 눌러 링크를 복사하는 수동 조작과 동일합니다.

로그인/토큰이 전혀 필요 없습니다 — 현재 Pshare의 아키텍처와 일관됩니다(웹 클라이언트 자체도 실제 인증을 하지 않고, 자동 생성된 X-Browser-Id만 사용합니다).

요구 사항: Pshare 인스턴스가 어딘가(localhost 또는 LAN 내)에서 이미 실행 중이어야 합니다 — 이 저장소는 Pshare의 REST API를 호출하는 MCP 서버일 뿐이며, Pshare를 자체적으로 실행하지 않습니다.

제공 도구

pshare_upload

필드

필수

설명

paths

✅

MCP 서버가 실행 중인 머신의 절대 경로 배열(파일 또는 폴더). 폴더는 하위 디렉터리 구조를 유지한 채 재귀적으로 업로드됩니다.

title

❌

공유 카드에 표시되는 제목

senderName

❌

수신자에게 표시되는 발신자 이름

password

❌

공유 링크를 여는 데 필요한 비밀번호

description

❌

공유 카드에 표시되는 설명

ttlMinutes

❌

링크가 유지되는 시간(분). 비워두면 만료되지 않음

반환 결과: http://<pshare-host>/?share=<N> 형식의 공유 링크와 파일 수 및 비밀번호 상태.

90MB를 초과하는 파일은 자동으로 청크 업로드로 전환됩니다(웹 클라이언트의 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

MCP가 업로드/공유를 위해 호출할 Pshare 서버의 URL

PSHARE_MCP_HOST

0.0.0.0

HTTP 전송 실행 시 바인딩할 호스트

PSHARE_MCP_PORT

7317

HTTP 전송 실행 시 포트

PSHARE_MCP_ALLOWED_HOSTS

(설정 안 함)

허용된 호스트 목록(쉼표로 구분). 0.0.0.0 바인딩 시 DNS-리바인딩 보호를 활성화하는 데 사용

localhost는 MCP 서버가 Pshare가 실행 중인 바로 그 머신에서 실행될 때만 올바릅니다. localhost는 항상 "해당 프로세스를 실행 중인 머신 자체"를 가리킵니다. 따라서 이 MCP를 Pshare가 실행 중인 머신과 다른 머신/노트북(같은 LAN이라도)에 설치하는 경우, 반드시 Pshare가 실행 중인 머신의 실제 IP로 변경해야 합니다. 예를 들어 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"

MCP(stdio)를 Pshare가 실행 중인 동일한 머신에서 실행할 때만 기본값 localhost를 유지하세요.

독립 실행 테스트

# 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 전송 — AI가 Pshare와 같은 머신/호스트에서 실행될 때 권장)

클론 + 빌드 후(위 설치 섹션 참조), Pshare-mcp 디렉터리에서:

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

다른 머신의 Pshare를 가리키려면 -e로 env를 전달하세요(구성 섹션의 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"
      }
    }
  }
}

pshare_upload 도구를 받으려면 Claude Desktop을 다시 시작하세요.

3. HTTP/SSE를 통한 사용(같은 LAN의 다른 머신에서 AI가 실행될 때)

Pshare를 호스팅하는 머신(또는 Pshare에 연결할 수 있는 모든 머신)에서 MCP 서버 실행:

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

클라이언트 머신(Claude Code 또는 HTTP 전송을 지원하는 모든 MCP 클라이언트)에서 다음을 가리키세요:

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. 다른 AI/에이전트 프레임워크와 함께 사용

MCP는 표준 JSON-RPC 프로토콜입니다 — 모든 MCP 클라이언트(LangChain MCP 어댑터, 커스텀 에이전트 등)도 연결할 수 있습니다. 필요한 것은 다음과 같습니다:

  • stdio: node dist/index.js 명령을 spawn하고 stdin/stdout을 통해 통신.

  • HTTP: MCP의 Streamable HTTP 전송 사양에 따라 POST http://<host>:<port>/mcp 호출.

보안 참고 사항

이 MCP 서버는 인증을 수행하지 않습니다 — 여기에 연결할 수 있는 사람(프로세스 실행 권한이 있는 경우 stdio를 통해, 또는 host:port에 접근할 수 있는 경우 HTTP를 통해)은 누구나 실제 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
    -