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

kdrive-mcp

v1.0.0

Published

MCP server for Infomaniak kDrive — search, list, and read files (text, Excel, Word, PDF, PowerPoint)

Downloads

27

Readme

kdrive-mcp

MCP server for Infomaniak kDrive — search, browse, and read files directly from your drive inside any MCP-compatible AI client.

Features

  • Search file content across the drive (full-text, indexed files)
  • Find any file by name using parallel recursive directory traversal
  • Browse the folder tree with list
  • Read plain-text files (txt, csv, json, xml, md, …)
  • Parse structured documents and return clean text:
    • Excel / Calc.xlsx, .xls, .ods → CSV per sheet (SheetJS)
    • Word.docx → plain text (mammoth)
    • PDF.pdf → plain text (PDF.js via unpdf)
    • PowerPoint / Impress.pptx, .ppt, .odp → plain text (officeparser)
    • Legacy / OpenDocument.doc, .odt → plain text (officeparser)
  • Smart router (kdrive_read) — auto-detects format, falls back to file extension when the MIME type is generic
  • MCP Resource — expose any file as a base64 blob via kdrive://{id}

Tools

kdrive_search

Full-text search across indexed file content.

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | query | string | — | Search terms | | limit | integer | 15 | Max results (1–50) |

Note: Binary files (xlsx, pdf, …) are not indexed by kDrive's search engine. Use kdrive_find to locate them by filename.


kdrive_find

Recursively walks the directory tree (5 concurrent requests) to find files or folders by filename substring — reliable for all file types.

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | query | string | — | Filename substring (case-insensitive) | | folder_id | string | "1" | Folder to start from ("1" = drive root) | | max_results | integer | 10 | Max matches (1–50) |


kdrive_list

List the contents of a folder (files and subdirectories).

| Parameter | Type | Description | |-----------|------|-------------| | file_id | string | Folder ID to list ("1" = root) |


kdrive_read

Smart router — inspects the MIME type (with file-extension fallback) and delegates to the right parser automatically.

| Parameter | Type | Description | |-----------|------|-------------| | file_id | string | ID of the file to read |

Supported formats: xlsx, xls, ods, docx, doc, pdf, pptx, ppt, odp, odt, and any plain-text format.


kdrive_read_text_file

Read a plain-text file (txt, csv, json, xml, md, …) decoded as UTF-8. Output capped at 100,000 characters.

| Parameter | Type | Description | |-----------|------|-------------| | file_id | string | ID of the text file |


kdrive_read_excel

Parse a spreadsheet and return all sheets as CSV. Supports .xlsx, .xls, and .ods. Output capped at 80,000 characters.

| Parameter | Type | Description | |-----------|------|-------------| | file_id | string | ID of the spreadsheet file |


kdrive_read_word

Extract plain text from a .docx file using mammoth (highest quality). Output capped at 80,000 characters.

| Parameter | Type | Description | |-----------|------|-------------| | file_id | string | ID of the .docx file |

For legacy .doc files use kdrive_read.


kdrive_read_pdf

Extract plain text from a PDF using PDF.js (via unpdf). All pages merged. Output capped at 80,000 characters.

| Parameter | Type | Description | |-----------|------|-------------| | file_id | string | ID of the PDF file |


kdrive_read_pptx

Extract slide text from a presentation using officeparser. Supports .pptx, .ppt, and .odp. Output capped at 80,000 characters.

| Parameter | Type | Description | |-----------|------|-------------| | file_id | string | ID of the presentation file |

Resources

kdrive://{id}

Exposes any kDrive file as a base64-encoded blob resource with the correct MIME type — useful for GUI-driven file selection in MCP clients that support resources.

Setup

Prerequisites

You need two values from your Infomaniak account:

  1. KDRIVE_TOKEN — an Infomaniak API token with kDrive access.
    Create one at app.infomaniak.com → API (scope: Drive).

  2. KDRIVE_ID — the numeric ID of your kDrive.
    Find it in the kDrive web app URL: https://kdrive.infomaniak.com/app/drive/**123456**/…

Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "kdrive": {
      "command": "npx",
      "args": ["-y", "kdrive-mcp"],
      "env": {
        "KDRIVE_TOKEN": "your-api-token",
        "KDRIVE_ID": "your-drive-id"
      }
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Claude Code (CLI)

claude mcp add kdrive-mcp --scope project \
  -e KDRIVE_TOKEN=your-api-token \
  -e KDRIVE_ID=your-drive-id \
  -- npx -y kdrive-mcp

VS Code

Add to your workspace .vscode/mcp.json:

{
  "servers": {
    "kdrive": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "kdrive-mcp"],
      "env": {
        "KDRIVE_TOKEN": "your-api-token",
        "KDRIVE_ID": "your-drive-id"
      }
    }
  }
}

Development

git clone https://github.com/ddanssaert/kdrive-mcp
cd kdrive-mcp
npm install

KDRIVE_TOKEN=your-token KDRIVE_ID=your-drive-id node index.js

Inspect tools interactively with the MCP Inspector:

KDRIVE_TOKEN=your-token KDRIVE_ID=your-drive-id \
  npx @modelcontextprotocol/inspector node index.js

Design Notes

  • Context bloat prevention — search and list results are mapped to minimal objects (id, name, mime_type, size). Raw API responses with internal metadata are never forwarded to the model.
  • Binary safety — all downloads use response.arrayBuffer(). Text is never decoded with response.text() + btoa(), which would corrupt non-UTF-8 bytes.
  • Output caps — parsed document text is sliced to 80,000–100,000 characters with a truncation notice so the model always knows when content is incomplete.
  • Timeout protection — API calls abort after 15 s; file downloads after 2 min.
  • Rate limit awareness — kDrive enforces 60 requests/min. kdrive_find batches directory listings 5 at a time to stay efficient without bursting.

License

MIT