@activefs/mcp
v0.1.0
Published
MCP adapter for exposing ActiveFS trees as generic resources.
Downloads
60
Maintainers
Readme
@activefs/mcp
MCP adapter and server helpers for exposing ActiveFS trees as resources, tools, and prompts.
Use this package when an MCP client should browse or read an ActiveFS remote.
The package also provides the activefs-mcp binary.
Install
npm install @activefs/mcp @activefs/coreRequires Node.js 20 or newer.
Small Example
import { createActiveFS, fsTree, text } from "@activefs/core";
import { createMCPAdapter } from "@activefs/mcp";
const tree = fsTree({
"/README.md": text("# Docs\n")
});
const activefs = createActiveFS().mount("/docs", tree);
const adapter = createMCPAdapter({
filesystem: activefs,
remotes: [{ name: "docs", rootPath: "/docs" }]
});
const resources = await adapter.listResources();
const readme = await adapter.readResource("activefs://docs/README.md");
console.log(resources.resources.length);
console.log(readme.contents[0]?.text);Binary
activefs-mcp --help
activefs-mcp --dry-run --demo
activefs-mcp --http --port 8765 --auth none --demoWhat It Owns
- ActiveFS-to-MCP resource mapping.
activefs://remote/pathresource URIs.- Stdio and Streamable HTTP MCP server helpers.
- Optional grep/tool/prompt surfaces over ActiveFS resources.
Docs
- MCP: https://github.com/ankitparasher/activefs/blob/main/docs/guides/mcp.md
- CLI MCP commands: https://github.com/ankitparasher/activefs/blob/main/docs/reference/cli.md
- Source API: https://github.com/ankitparasher/activefs/blob/main/docs/reference/source-api.md
