Token导航 LogoToken导航TokenDH.com
mcpfs (Airshelf) logo
开发工具未说明官方级别未说明来源级核验

mcpfs (Airshelf)

MCP Server

mcpfs是一个将任何MCP服务器挂载为文件系统的工具,支持通过cat读取和CLI写入。

工具数

0

提示词数

0

GitHub Stars

4

资源数

0
命令行工具GoClaudeClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

airshelf

提供方

airshelf

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

mcpfs

将任何MCP服务器作为文件系统安装。通过阅读 cat,通过CLI写入。

运作原理

mcpfs连接到任何MCP服务器(stdio或HTTP),将其工具分为读取和写入,并将读取作为文件公开:

 Agent / Shell                    mcpfs (FUSE)                  Any MCP Server
┌─────────────┐              ┌──────────────────┐         ┌──────────────────┐
│ ls /mnt/...  │─── readdir ─▶│ tools/list →     │         │ PostHog, Stripe, │
│ cat file.json│─── read() ──▶│ classify → tree  │── RPC ─▶│ GitHub, Linear,  │
│ jq '.name'  │◀── bytes ───│ tools/call       │◀─ JSON ─│ or anything      │
└─────────────┘              └──────────────────┘         └──────────────────┘

 Agent / Shell                    mcpfs tool CLI
┌─────────────┐              ┌──────────────────┐
│ mcpfs tool   │── flags ──▶│ parse CLI flags  │── RPC ─▶ MCP Server
│ posthog      │              │ tools/call       │
│ create-flag  │◀── JSON ───│                  │◀─ JSON ─
└─────────────┘              └──────────────────┘

分类规则:

  • list_*, get_all_*,没有必需的参数→ 文件 (dashboards.json)
  • get_*, retrieve_*,需要参数→ 目录 (按ID查找)
  • create_*, update_*, delete_*仅限CLI (mcpfs tool)
  • search_*, query_*仅限CLI (mcpfs tool)

资源(如果服务器有)也作为文件挂载。

快速开始

# Build and install
go install github.com/airshelf/mcpfs/cmd/mcpfs@latest

# Auto-discover Claude Code plugins and mount in project dir
cd ~/src/myproject
mcpfs auto                    # mounts to .mcpfs/ in cwd
mcpfs auto --mount /mnt/mcpfs # or specify a custom mount dir

# Mount a single server
mcpfs .mcpfs/posthog --http https://mcp.posthog.com/mcp --auth "Bearer $POSTHOG_API_KEY"
mcpfs .mcpfs/stripe -- npx -y @stripe/mcp

# Read
ls .mcpfs/posthog/
cat .mcpfs/posthog/dashboards.json
cat .mcpfs/stripe/balance.json

# Write (CLI)
mcpfs tool posthog create-feature-flag --key my-flag --name "My Flag"
mcpfs tool stripe create_customer --name "Acme Corp" --email acme@example.com

# List all tools for a server
mcpfs tool posthog
mcpfs tool stripe

# Unmount
fusermount -u .mcpfs/posthog

配置文件

从单个配置装载多个服务器(~/.config/mcpfs/servers.json):

{
  "posthog": {
    "type": "http",
    "url": "https://mcp.posthog.com/mcp",
    "headers": {"Authorization": "Bearer ${POSTHOG_API_KEY}"}
  },
  "stripe": {
    "command": "npx",
    "args": ["-y", "@stripe/mcp"],
    "env": {"STRIPE_SECRET_KEY": "${STRIPE_API_KEY}"}
  },
  "github": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-github"],
    "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"}
  }
}

环境变量(${VAR})从过程环境或 ~/.config/mcpfs/env.

# Mount all to .mcpfs/ in cwd
mcpfs --config ~/.config/mcpfs/servers.json

# Mount to custom dir
mcpfs --config ~/.config/mcpfs/servers.json --mount /mnt/mcpfs

自动发现Claude代码插件

如果你使用克劳德代码, mcpfs auto 发现所有已安装的MCP插件并将其挂载到您的项目中:

cd ~/src/myproject
mcpfs auto           # discover + mount to .mcpfs/
mcpfs auto --json    # print discovered config (dry run)

安装到 .mcpfs/ 在当前目录中。读取 .env.local.env 从cwd获取项目特定的证书(例如,不同的Vercel团队,每个仓库的PostHog项目)。

它从所有Claude Code配置源中读取:

  • ~/.claude.jsonmcpServers --全局用户配置服务器
  • ~/.claude/plugins/ --已安装的插件及其 .mcp.json
  • ~/.claude/settings.jsonenabledPlugins --还扫描缓存以查找这些
  • ~/.claude/.credentials.json --OAuth令牌(Notion等)
  • ~/.config/mcpfs/servers.json --其他用户定义的服务器
  • ~/.config/mcpfs/env -回退环境变量(API密钥)
  • gh auth token --GitHub令牌回退

非数据插件(剧作家、serena、context7)会自动跳过。

跨服务组合

# Business dashboard
printf "%-20s %s\n" "Stripe balance" "$(cat .mcpfs/stripe/balance.json | jq -r '.available[] | "\(.currency) \(.amount / 100)"')"
printf "%-20s %s\n" "Active subs" "$(cat .mcpfs/stripe/subscriptions.json | jq '[.[] | select(.status=="active")] | length')"
printf "%-20s %s\n" "PH dashboards" "$(cat .mcpfs/posthog/dashboards.json | jq length)"

# Find paying customers with no analytics activity
comm -23 \
  ` 列出写入/查询工具 `--help`
- `mcpfs tool   --flag value` 为写作
- 所有工具输出都会进入stdout(JSON),提示会进入stderr
- 退出代码:0成功,1错误

## 许可证

麻省理工学院

目录标签

目录标签

命令行工具GoClaude文件系统挂载本地部署MCP服务器CLI工具FUSE

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

oauth

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明oauth部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP