Mcpez 517c0db3

MCP运维云端

提供方 johnlindquist

运维云端 未标注 无需鉴权 社区 / 第三方

一个轻量级的ESM封装工具,用于使用TypeScript和Bun构建MCP服务器,提供提示、工具、资源管理和日志功能。

一句话选型结论

按资料字段整理

Mcpez 517c0db3 属于运维云端类 MCP 服务器,传输方式未标注,无需鉴权,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类运维云端 传输方式未标注 鉴权无需鉴权 部署方式未标注
GitHub 星标 6 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

运维云端
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

适用场景

MCP服务器TypeScript本地部署TypeScript工具Bun集成资源管理日志记录

安装与配置

未标注 无需鉴权
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
云资源查询

查实例、存储、账单等云上资源状态。

部署与发布

把部署、重启、回滚这类操作接进对话。

监控与告警

拉取监控指标,异常时让模型帮你判断。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在运维云端场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Mcpez 517c0db3当前 未标注 未标注 未标注 无 2026-05-17
lobehub 未标注 stdio · 本地进程 本地部署 有 2026-04-11
TrendRadar 未标注 stdio · 本地进程 本地部署 有 2026-04-13
Ui Tars Desktop 8a825770 未标注 stdio · 本地进程 本地部署 有 2026-05-17
ruflo 未标注 stdio · 本地进程 本地部署 有 2026-04-13
FastGPT 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

运维云端
字段来自项目仓库与公开索引,中文说明由本站标注
提供方johnlindquist上游标注的维护方 johnlindquist
分类运维云端本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

10.9 KB
来自项目仓库与上游目录的原文,未做删改

mcpez

Minimal, ergonomic ESM wrapper for building MCP servers with TypeScript and Bun.

Install```bash

bun add mcpez


## Quickstart

### Minimal Examples

#### Prompt```ts
import { prompt, z } from "mcpez"

prompt(
  "review-code",
  {
    description: "Review code for best practices and potential issues",
    argsSchema: {
      code: z.string(),
    },
  },
  ({ code }) => ({
    messages: [
      {
        role: "user",
        content: {
          type: "text",
          text: `Please review this code:\n\n${code}`,
        },
      },
    ],
  }),
)

> Note: Zod is bundled with mcpez, so you don't need to install it separately.

Why Zod is Bundled

mcpez bundles Zod v3 to ensure compatibility with the MCP SDK, which requires Zod v3 specifically. Since Zod v4 has breaking changes that cause runtime errors like keyValidator._parse is not a function, bundling Zod v3 prevents version conflicts and provides a simpler, error-free developer experience. You can import z directly from mcpez:

Tool```ts

import { tool, z } from "mcpez"

tool(
"add",
{
description: "Add two numbers",
inputSchema: {
a: z.number(),
b: z.number(),
},
},
async ({ a, b }) => {
const result = a + b
return {
content: [{ type: "text", text: ${a} + ${b} = ${result} }],
}
},
)

// No need to manually call startServer(); the server boots on the next tick.


#### Resource```ts
import { resource } from "mcpez"

type EnvironmentConfig = {
  settings: {
    databaseUrl: string
    featureFlags: Record<string, boolean>
  }
  secrets: {
    apiKey: string
  }
}

// In-memory configuration data keyed by deployment environment.
const environmentConfigs = new Map<string, EnvironmentConfig>([
  [
    "production",
    {
      settings: {
        databaseUrl: "postgresql://prod.db.internal/app",
        featureFlags: {
          betaDashboard: false,
          useV2Search: true,
        },
      },
      secrets: {
        apiKey: "prod-12345",
      },
    },
  ],
  [
    "staging",
    {
      settings: {
        databaseUrl: "postgresql://staging.db.internal/app",
        featureFlags: {
          betaDashboard: true,
          useV2Search: true,
        },
      },
      secrets: {
        apiKey: "staging-67890",
      },
    },
  ],
  [
    "development",
    {
      settings: {
        databaseUrl: "postgresql://localhost:5432/app",
        featureFlags: {
          betaDashboard: true,
          useV2Search: false,
        },
      },
      secrets: {
        apiKey: "dev-abcde",
      },
    },
  ],
])

resource(
  "environment-config",
  "config://environment",
  {
    description: "Environment-specific configuration values with optional secrets.",
    mimeType: "application/json",
  },
  async (uri) => {
    const params = uri.searchParams
    const environment = params.get("env") ?? "production"

    const config = environmentConfigs.get(environment)
    if (!config) {
      return {
        contents: [
          {
            uri: uri.href,
            mimeType: "application/json",
            text: JSON.stringify(
              {
                error: `Unknown environment: ${environment}`,
                availableEnvironments: Array.from(environmentConfigs.keys()),
              },
              null,
              2,
            ),
          },
        ],
      }
    }

    const includeSecrets = params.get("secrets") === "true"

    const payload = {
      environment,
      settings: config.settings,
      ...(includeSecrets ? { secrets: config.secrets } : {}),
      generatedAt: new Date().toISOString(),
    }

    return {
      contents: [
        {
          uri: uri.href,
          mimeType: "application/json",
          text: JSON.stringify(payload, null, 2),
        },
      ],
    }
  },
)

Resource Template```ts

import { resourceTemplate } from "mcpez"

type LogLevel = "info" | "warning" | "error"
type LogEntry = {
timestamp: string
message: string
context?: Record<string, unknown>
}

// Structured audit logs keyed by ISO date and severity level.
const auditLogStore: Record<string, Record<LogLevel, LogEntry[]>> = {
"2024-04-01": {
info: [
{ timestamp: "2024-04-01T08:00:00Z", message: "Deployment pipeline triggered" },
{ timestamp: "2024-04-01T08:05:12Z", message: "Deployment completed successfully" },
],
warning: [
{
timestamp: "2024-04-01T09:12:33Z",
message: "Retrying connection to Redis leader",
context: { attempts: 2 },
},
],
error: [
{
timestamp: "2024-04-01T09:15:00Z",
message: "Payment gateway timeout",
context: { orderId: "ORD-481516" },
},
],
},
"2024-04-02": {
info: [
{ timestamp: "2024-04-02T07:45:00Z", message: "Background sync completed" },
{ timestamp: "2024-04-02T10:30:00Z", message: "New feature flag enabled" },
],
warning: [
{
timestamp: "2024-04-02T11:05:48Z",
message: "Slow database query detected",
context: { durationMs: 830, query: "SELECT * FROM invoices" },
},
],
error: [],
},
}

const strictLevels: LogLevel[] = ["info", "warning", "error"]

const firstValue = (value: string | string[] | undefined): string | undefined =>
Array.isArray(value) ? value[0] : value

resourceTemplate(
"audit-log",
{
name: "audit-log",
title: "Audit log by date and level",
uriTemplate: "audit-log://{date}/{level}",
description: "Retrieve stored audit log entries filtered by ISO date and severity level.",
},
{
description: "Audit log entries grouped by date and severity level.",
mimeType: "application/json",
},
async (uri, variables) => {
const typedVariables = variables as Record<string, string | string[] | undefined>
const date = firstValue(typedVariables.date)
const level = firstValue(typedVariables.level)

if (!date || !level) {
  return {
    contents: [
      {
        uri: uri.href,
        mimeType: &quot;application/json&quot;,
        text: JSON.stringify(
          {
            error: &quot;Both {date} and {level} must be provided in the URI template.&quot;,
            expectedUri: &quot;audit-log://2024-04-01/error&quot;,
          },
          null,
          2,
        ),
      },
    ],
  }
}

const normalizedLevel = level.toLowerCase()
if (!strictLevels.includes(normalizedLevel as LogLevel)) {
  return {
    contents: [
      {
        uri: uri.href,
        mimeType: &quot;application/json&quot;,
        text: JSON.stringify(
          {
            error: `Unsupported log level: ${level}`,
            supportedLevels: strictLevels,
          },
          null,
          2,
        ),
      },
    ],
  }
}

const entriesByLevel = auditLogStore[date]
if (!entriesByLevel) {
  return {
    contents: [
      {
        uri: uri.href,
        mimeType: &quot;application/json&quot;,
        text: JSON.stringify(
          {
            error: `No logs found for ${date}.`,
            availableDates: Object.keys(auditLogStore),
          },
          null,
          2,
        ),
      },
    ],
  }
}

const entries = entriesByLevel[normalizedLevel as LogLevel]

if (!entries || entries.length === 0) {
  return {
    contents: [
      {
        uri: uri.href,
        mimeType: &quot;application/json&quot;,
        text: JSON.stringify(
          {
            message: `No ${normalizedLevel} logs found for ${date}.`,
            availableLevels: strictLevels.filter((item) =&gt; entriesByLevel[item].length &gt; 0),
          },
          null,
          2,
        ),
      },
    ],
  }
}

return {
  contents: [
    {
      uri: uri.href,
      mimeType: &quot;application/json&quot;,
      text: JSON.stringify(
        {
          date,
          level: normalizedLevel,
          count: entries.length,
          entries,
        },
        null,
        2,
      ),
    },
  ],
}

},
)


#### Logging and Notifications```ts
import { getServer, log, notifyToolListChanged, tool } from &quot;mcpez&quot;

// Register a simple tool
tool(&quot;greet&quot;, { description: &quot;Greet the user&quot; }, async () =&gt; {
  // Send a log message to the client
  log.info(&quot;Greeting tool was called&quot;)

  return {
    content: [
      {
        type: &quot;text&quot;,
        text: &quot;Hello from mcpez!&quot;,
      },
    ],
  }
})

// Register another tool that modifies the tool list
tool(&quot;add_tool&quot;, { description: &quot;Simulate adding a new tool&quot; }, async () =&gt; {
  log.info(&quot;New tool would be added here&quot;)

  // Notify the client that the tool list has changed
  notifyToolListChanged()

  return {
    content: [
      {
        type: &quot;text&quot;,
        text: &quot;Tool list changed!&quot;,
      },
    ],
  }
})

// Example of using getServer() for advanced operations
const server = getServer()
if (server) {
  log.debug(&quot;Server is running, can access advanced APIs&quot;)
} else {
  log.debug(&quot;Server not started yet, logging is queued&quot;)
}

Fully Configured Example```ts

import { prompt, resource, startServer, tool, z } from "mcpez"

tool(
"echo",
{
description: "Echoes back the provided message",
inputSchema: { message: z.string() },
},
async ({ message }) => {
const output = { echo: Tool echo: ${message} }
return {
content: [{ type: "text", text: JSON.stringify(output) }],
}
},
)

resource(
"echo",
"echo://message",
{
description: "Echoes back messages as resources",
},
async (uri) => ({
contents: [
{
uri: uri.href,
text: Resource echo: Hello!,
},
],
}),
)

prompt(
"echo",
{
description: "Creates a prompt to process a message",
argsSchema: { message: z.string() },
},
({ message }) => ({
messages: [
{
role: "user",
content: {
type: "text",
text: Please process this message: ${message},
},
},
],
}),
)

// Start with custom server name and version
await startServer("example-full-server", { version: "1.0.0" })
```

API

  • prompt(name, options, handler)
  • tool(name, options, handler)
  • resource(name, options)
  • resourceTemplate(name, options)
  • startServer(name, serverOptions?, transport?)
  • getServer() - Get the running server instance
  • log.info(data, logger?) - Send a logging message (other helpers: debug, notice, warning, error, critical, alert, emergency)
  • notifyResourceListChanged() - Notify when resources change
  • notifyToolListChanged() - Notify when tools change
  • notifyPromptListChanged() - Notify when prompts change

All register* calls can be made before startServer; they are queued and applied
when the server starts. startServer is optional and defaults to StdioServerTransport.

ESM only

This package ships ESM only. Ensure your project has &quot;type&quot;: &quot;module&quot; or uses
ES module import syntax.

License

MIT

常见问题

5 问
答案由本站依据条目字段整理,不引用上游原文
Mcpez 517c0db3 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

Mcpez 517c0db3 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

Mcpez 517c0db3 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Mcpez 517c0db3 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Mcpez 517c0db3 能提供哪些能力?

资料显示能力标签包括 日志记录、资源管理、TypeScript。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。