Files
memona-plugin-aindrive/README.md
T
RaymondCho c12f3bdfcd
CI / checks (pull_request) Successful in 1m28s
Agents / bot (pull_request) Successful in 3m19s
The README shows how a connected drive looks in Memona
Screenshots of the connection form, a connection with a wrong token, a
drive's PAGE.md and a save that met a change from elsewhere, taken in
Memona running this plugin against a live drive. They link to main so
they also render on the plugin page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:14:14 +09:00

4.1 KiB

Memona aindrive plugin

Opens an aindrive drive as a folder inside Memona, so agents and the file manager work in it like any local directory, from any machine. The plugin is a WASI component: it speaks no sockets of its own and makes every request through the host's HTTP interface, to the drive's remote MCP endpoint, with the drive's access token.

It registers one provider, aindrive, for the aindrive scheme.

This package requires a Memona version that supports plugin manifest schema 2.

Connecting

In aindrive, open the drive and choose MCP in its sidebar. Copy the Server URL, then under Option B · Access token generate a token and copy it; aindrive shows it only once.

Field Meaning
Server URL The drive's MCP server URL, for example https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456. The drive's own page address, …/d/AbCdEf123456, works too, as does a self-hosted server.
Access token The aind_pat_… token, stored as a secret

The connection form

Saving the connection checks the address and the token. It does not need the machine that shares the drive to be online, but its files only answer while that machine runs aindrive; until then they report the folder unavailable.

With a wrong token the connection shows as Disconnected:

A connected drive and one with a wrong token

What works

Browsing folders, and reading, saving and deleting files. A token generated as Read only opens the drive read-only.

A drive's PAGE.md opened in Memona

aindrive reads a file whole, at most 8 MiB at a time, so a larger file is refused as unsupported rather than cut short. A read is checked against the size the drive reported a moment before, so a file that changes in between is a conflict rather than a mix of two versions.

A save sends the file whole, up to 1 MiB, the most Memona saves in one transfer. It names the revision it was read at, and aindrive compares and writes under one lock, so a file someone changed since is reported as a conflict instead of being overwritten. A save into a folder that does not exist yet creates that folder, as aindrive does.

A file changed on the drive's machine while it was open in Memona

Deleting takes one file. A folder is refused: aindrive deletes a folder with everything in it, and leaves some entries, such as .git, out of every listing, so a folder cannot be shown to be empty first.

Creating folders, renaming and change polling are not supported, since the drive's MCP endpoint offers no tool for them. Names the drive's machine allows but Memona cannot show, such as one containing a backslash, are left out of listings.

Building

rustup target add wasm32-wasip2
cargo build --locked --release --target wasm32-wasip2

The component lands at target/wasm32-wasip2/release/memona_plugin_aindrive.wasm.

wit/filesystem.wit is a copy of the canonical Memona filesystem contract, and src/sdk.rs generates the guest bindings from it, so this repository builds without a Memona checkout. Refresh the copy from plugin_system/sdk/wit in the Memona repository when the contract moves, and keep apiVersion in manifest.json in step.

Packaging for the plugin store

A .memona-plugin package is a ZIP archive with the files at its root, never inside a directory:

cargo build --locked --release --target wasm32-wasip2
cp target/wasm32-wasip2/release/memona_plugin_aindrive.wasm plugin.wasm
zip memona-plugin-aindrive.memona-plugin \
  manifest.json plugin.wasm README.md LICENSE

manifest.json and plugin.wasm are required; README.md becomes the guide on the plugin's public page and LICENSE is shown beside it.