@enfyra/mcp-server

中文文档
0.3.24发布于 2026/11/02MITTypeScriptES Module近 30 天下载 2607

MCP server for Enfyra - manage Enfyra instances from MCP-compatible coding tools

原始使用文档
文档目录6 节
  1. Install and Configure
  2. Manual Configuration
  3. Config Command
  4. Environment
  5. Verify the Connection
  6. Development

Enfyra MCP Server

Connect Enfyra to MCP-compatible coding tools such as Codex, Claude Code, Cursor, VS Code / GitHub Copilot, Google Antigravity, ZCode, and other STDIO MCP hosts.

Install and Configure

Run this from the project that should use Enfyra:

npx @enfyra/mcp-server@latest config

The setup asks for:

  • the Enfyra app/admin URL, such as http://localhost:3000 or https://demo.enfyra.io;
  • an ENFYRA_API_TOKEN created from the Enfyra admin UI /me page;
  • the MCP clients to configure.

It writes project-local configuration, records the setup directory as ENFYRA_MCP_PROJECT_ROOT, and replaces only the enfyra server entry.

ClientCommandProject config
Codexnpx @enfyra/mcp-server@latest config --codex.codex/config.toml
Claude Codenpx @enfyra/mcp-server@latest config --claude-code.mcp.json
Cursornpx @enfyra/mcp-server@latest config --cursor.cursor/mcp.json
VS Code / GitHub Copilotnpx @enfyra/mcp-server@latest config --vscode.vscode/mcp.json
Google Antigravitynpx @enfyra/mcp-server@latest config --antigravity.agents/mcp_config.json
ZCodenpx @enfyra/mcp-server@latest config --zcode.zcode/config.json

Non-interactive setup for all supported clients:

npx @enfyra/mcp-server@latest config --yes \
  --app-url http://localhost:3000 \
  --api-token efy_pat_your-token

Remove temporary source artifacts and local telemetry files created by MCP:

npx @enfyra/mcp-server@latest cleanup

Configure more than one selected client:

npx @enfyra/mcp-server@latest config --cursor --claude-code

Manual Configuration

For hosts that accept an mcpServers JSON block:

{
  "mcpServers": {
    "enfyra": {
      "command": "npx",
      "args": ["-y", "@enfyra/mcp-server@latest"],
      "env": {
        "ENFYRA_API_URL": "http://localhost:3000/api",
        "ENFYRA_API_TOKEN": "efy_pat_your-token"
      }
    }
  }
}

Codex project configuration uses TOML:

[mcp_servers.enfyra]
command = "npx"
args = ["-y", "@enfyra/mcp-server@latest"]

[mcp_servers.enfyra.env]
ENFYRA_API_URL = "http://localhost:3000/api"
ENFYRA_API_TOKEN = "efy_pat_your-token"

ZCode uses a nested mcp.servers JSON structure in .zcode/config.json:

{
  "mcp": {
    "servers": {
      "enfyra": {
        "command": "npx",
        "args": ["-y", "@enfyra/mcp-server@latest"],
        "env": {
          "ENFYRA_API_URL": "http://localhost:3000/api",
          "ENFYRA_API_TOKEN": "efy_pat_your-token"
        }
      }
    }
  }
}

Restart or reload the MCP client after writing configuration. Keep the token out of committed files.

Config Command

npx @enfyra/mcp-server@latest config [options]
OptionUse
--app-urlSet the Enfyra app/admin URL
--api-token, -tSet ENFYRA_API_TOKEN
--yesRun non-interactively
--reconfigSelect clients again and replace the existing enfyra entry
--static-toolsPreserve compatibility config; the runtime still exposes only enfyra
--codexWrite Codex config
--claude-code, --claudeWrite Claude Code config
--cursorWrite Cursor config
--vscode, --copilotWrite VS Code / GitHub Copilot config
--antigravityWrite Google Antigravity config
--zcodeWrite ZCode config
-h, --helpShow CLI help

Environment

VariableDescriptionDefault
ENFYRA_API_URLRuntime API base written into MCP configRequired
ENFYRA_API_TOKENProgrammatic token from the Enfyra admin UI /meRequired
ENFYRA_MCP_PROJECT_ROOTAbsolute project directory for source workspacesSet by config; otherwise use an explicit tool argument or one client-provided root

The MCP connection exposes one tool, enfyra, throughout the session. No tool-loading configuration is needed. ENFYRA_MCP_PROFILE guides workflow discovery; it does not add public tools. Re-running config preserves existing advanced settings. ENFYRA_MCP_DYNAMIC_TOOLS and --static-tools do not change the single-tool runtime surface. Reconnect the MCP client after updating the installed package.

The MCP sends this PAT directly through Enfyra Server's native x-enfyra-pat header. It does not exchange the PAT for a short-lived access token or send it as a Bearer token.

Source workflows prepare an enfyra/ working directory and store source snapshots and diffs under .tmp/enfyra/<target>/<session>/ inside the selected project. Preparation adds /enfyra/ and /.tmp/enfyra/ to the project's .gitignore before writing source. The runtime does not infer the project from its launch directory. Reopen the workspace in each new MCP session; existing local edits are preserved.

Verify the Connection

Open a new session in the configured MCP client and ask it to:

Use Enfyra MCP to show the connected API context.

Then try a read-only request:

Use Enfyra MCP to list the available tables without changing anything.

Development

This repository uses Yarn 4 and TypeScript:

yarn typecheck
yarn test

Use AGENTS.md for maintainer architecture, tool contracts, verification rules, and backend sync points. LLM runtime guidance is served by the MCP instructions, tool descriptions, workflow discovery, required-knowledge tools, builders, and examples—not by this README.

版本与发布记录

@enfyra/mcp-server 共发布 294 个版本,首次发布于 2026/03/21;过去 12 个月发布了 294 个版本。

版本发布日期距今
0.3.24latest2026/11/0211 天前
0.3.232026/11/0113 天前
0.3.222026/10/2421 天前
0.3.212026/10/2223 天前
0.3.202026/10/2223 天前
0.3.192026/10/2123 天前

关于 @enfyra/mcp-server 的常见问题

@enfyra/mcp-server 是什么?

MCP server for Enfyra - manage Enfyra instances from MCP-compatible coding tools

如何安装 @enfyra/mcp-server?

在项目目录运行 npm install @enfyra/mcp-server,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 mcp-server、enfyra-mcp-server,可以用 npx mcp-server 直接运行。

@enfyra/mcp-server 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@enfyra/mcp-server 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@enfyra/mcp-server 可以商用吗?

@enfyra/mcp-server 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@enfyra/mcp-server 的下载量有多少?

根据 npm 官方下载统计,@enfyra/mcp-server 在 2026/10/14 – 2026/11/12 这 30 天内被下载 2,607 次,日均约 87 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@enfyra/mcp-server 还在维护吗?

最新版本 0.3.24 发布于 2026/11/02(11 天前);至今共发布 294 个版本,其中过去 12 个月发布了 294 个;首次发布于 2026/03/21。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。