npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sharepage/mcp

v0.2.0

Published

Local stdio MCP server for SharePage. Adds path-based upload tools that bypass LLM token emission for large files.

Readme

@sharepage/mcp

SharePage 用のローカル stdio MCP サーバー。大きいファイルのアップロード/上書きを高速化 するために upload_document_from_path / update_document_from_path ツールを提供します。

仕組み

通常、MCP ツールの引数は LLM が JSON として 1 トークンずつ生成するため、57KB の HTML を upload_documentcontent に渡すと数分かかります(LLM の出力速度が律速)。

このローカル MCP は 薄いプロキシ として振る舞い、ファイル本文を LLM のトークン化を経由せず Node.js プロセスから直接サーバーへマルチパート送信します。LLM が出力するのはファイルパス(数十文字)だけ。

| ツール | 経路 | |---|---| | upload_document_from_path (このパッケージで追加) | Node がパス → ファイル → multipart で ${SHAREPAGE_URL}/api/documents へ POST | | update_document_from_path (このパッケージで追加) | Node がパス → ファイル → multipart で ${SHAREPAGE_URL}/api/documents/:id へ PATCH (本文を丸ごと上書き、title / visibility は変更しない) | | list_documents, get_document, patch_document, ... (既存全部) | tools/list / tools/call を JSON-RPC のまま ${SHAREPAGE_URL}/mcp へ転送 |

新しい MCP ツールがサーバー側に追加されても、このパッケージを更新せずに自動で tools/list に反映されます(dumb forwarder 設計)。

セットアップ

1. API トークンを取得

SharePage にログインして「Claude カスタムコネクタの設定」ページから API トークンを発行してください。

2. MCP クライアントに登録

Claude Code (.mcp.json または ~/.claude.json)

{
  "mcpServers": {
    "sharepage": {
      "command": "npx",
      "args": ["-y", "@sharepage/mcp"],
      "env": {
        "SHAREPAGE_URL": "https://sharepage.example.com",
        "SHAREPAGE_API_TOKEN": "your-api-token"
      }
    }
  }
}

Claude Desktop (claude_desktop_config.json)

同じ mcpServers 構成を Claude Desktop の設定ファイルに追加します。

使い方

新規アップロード:

ユーザー: ./report.html を SharePage に「Q4 レポート」というタイトルで上げて
Claude: upload_document_from_path({path: "./report.html", title: "Q4 レポート"})
       → 即座に完了

既存ドキュメントの本文を丸ごと上書き (title / visibility は維持):

ユーザー: ID 42 のドキュメントを ./report.html で差し替えて
Claude: update_document_from_path({document_id: 42, path: "./report.html"})
       → 即座に完了

部分的な置換だけしたい場合は patch_document を使ってください。

環境変数

| 変数 | 必須 | 説明 | |---|---|---| | SHAREPAGE_URL | ✅ | SharePage の URL (例: https://sharepage.example.com) | | SHAREPAGE_API_TOKEN | ✅ | API トークン |

開発

npm install
npm run build
SHAREPAGE_URL=http://localhost:3000 SHAREPAGE_API_TOKEN=xxx node dist/index.js

ライセンス

MIT