mulewatch

io.github.brbousnguar由 GitHub 帳號 brbousnguar 發布v0.1.2更新於 Oct 25, 2026

Read-only MCP server for MuleSoft Anypoint: app logs, archive search, Runtime Manager, Exchange.

概覽

AI 產生的概覽

針對 MuleSoft Anypoint 的唯讀 MCP 伺服器,讓助理查看已部署的 Mule 應用程式、應用程式日誌、封存日誌、API Manager 執行個體和 Exchange 資產。

可以做什麼
確認憑證、業務群組、主機與環境允許清單,並列出憑證所屬組織下的業務群組與環境
適用情境
適合需要以自然語言排查 Mule 環境的維運人員:部署了什麼、由什麼前置、哪裡出了問題。適用於日誌排查與歷史事件檢索,無需本機 Mule 專案;若需腳手架、產生流程或部署,官方 MuleSoft 伺服器更合適。
執行需求
需要 Node.js 20+ 以及可存取目標業務群組的 Anypoint Platform 帳戶。需要代表自身行事的 connected app(用戶端 id 與密鑰)或平台登入憑證,並具備所用功能對應的權限範圍。歷史封存搜尋需為組織啟用 Anypoint Monitoring。僅透過環境變數設定。
安裝前請注意
需要 Anypoint connected app 憑證(ANYPOINT_CLIENT_ID 與 ANYPOINT_CLIENT_SECRET)或平台登入;這些從環境讀取,應盡量縮小權限範圍。所有工具皆為唯讀,沒有部署、停止、重新啟動或原則變更。可用 ANYPOINT_ALLOWED_ENVIRONMENTS 避免觸及生產環境。封存全量掃描可能較慢且受速率限制。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 mulewatch,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[mulewatch]

mulewatch

Read-only observability for MuleSoft Anypoint Platform, over MCP.
Application logs, historical archive search, Runtime Manager, API Manager and Exchange — for any Anypoint customer, using their own credentials.

[mulewatch on npm] [Listed in the MCP registry] [Apache-2.0 licensed]
[Platform] [MCP SDK] [Node.js] [MuleSoft Anypoint]

How it works · Project page · npm · MCP registry


What it does

mulewatch bridges an MCP client — Claude Desktop, Claude Code, Cursor, OpenClaw — to MuleSoft Anypoint Platform, so you can ask about a Mule estate in plain language and get real answers from the platform APIs. It is aimed at the person holding the pager, not the person writing the flow: no local Mule project is required, and every tool is read-only.

  • Application logs from Runtime Manager, normalized across CloudHub 2.0, Runtime Fabric and legacy CloudHub.
  • Historical log search through the Anypoint Monitoring Archive API, reaching incidents long past the live tail's rolling buffer.
  • Analysis-ready log payloads — normalized lines plus counts by priority, logger and replica.
  • Runtime Manager inventory across Application Manager, CloudHub and hybrid on-prem targets.
  • API Manager instances and Exchange assets, so a single server answers "what is deployed, what is it fronted by, and what broke".

Nothing is hardcoded to one customer: business groups, environments and credentials all come from your own connected app.

How this relates to the official MuleSoft MCP server

MuleSoft publishes its own MCP server (mulesoft-mcp-server, docs). It is a development tool — it scaffolds Mule projects, generates flows and API specs, and deploys applications, largely from a local project in an IDE.

mulewatch is an operations tool. It never writes to your estate, it assumes no local project, and it covers the one area the official server does not address at all: retrieving and searching application logs, including historical logs from the Monitoring Archive. The two run happily side by side, and if you want deployment or scaffolding tools, use the official one.

Requirements

  • Node.js 20+
  • An Anypoint Platform account with access to the business group you want to read
  • A connected app (recommended) with "acts on its own behalf" enabled, or platform credentials
  • For historical log search only: Anypoint Monitoring enabled for the organization

Connected-app scopes

Grant the scopes for the surfaces you intend to use, on the business groups and environments you care about. Anypoint returns a bare 403 Forbidden when a scope is missing; mulewatch catches that and names the scope you probably need.

SurfaceScope
Environments, business groupsView Environments, View Organization
Runtime Manager apps and logsRead Applications
Historical archive searchAnypoint Monitoring Viewer
API Manager instancesView APIs Configuration
Exchange assetsExchange viewer access

Setup

Create a connected app in Anypoint Platform → Access Management → Connected Apps, choose "App acts on its own behalf (client credentials)", grant the scopes above, and copy the client id and secret.

Configuration is environment variables only — there is no config file and no organization default.

dotenv
ANYPOINT_CLIENT_ID=your_connected_app_client_idANYPOINT_CLIENT_SECRET=your_connected_app_client_secret
VariableRequiredPurpose
ANYPOINT_CLIENT_ID / ANYPOINT_CLIENT_SECRETone auth methodConnected app client credentials, preferred for automation
ANYPOINT_USERNAME / ANYPOINT_PASSWORDone auth methodPlatform login
ANYPOINT_ACCESS_TOKENone auth methodPre-generated bearer token; takes precedence over the other two
ANYPOINT_ORG_IDnoBusiness group id. Unset means "the organization the credentials belong to"
ANYPOINT_ALLOWED_ENVIRONMENTSnoComma-separated environment names or ids; when set, every tool refuses anything outside the list
ANYPOINT_BASE_URLnoControl plane host, defaults to https://anypoint.mulesoft.com
ANYPOINT_MONITORING_BASE_URLnoMonitoring host, defaults to https://monitoring.anypoint.mulesoft.com

Business groups

Environments live on business groups, not on the root organization. If anypoint_list_environments comes back empty, your credentials resolved to the root org — call anypoint_list_business_groups to list the ids, then pass one as orgId or pin it with ANYPOINT_ORG_ID.

Keeping production out of reach

ANYPOINT_ALLOWED_ENVIRONMENTS scopes the whole server, not one tool. With

dotenv
ANYPOINT_ALLOWED_ENVIRONMENTS=Dev,Sandbox

every tool refuses an environment outside the list and says why, whichever business group is targeted. Combine it with a connected app that only has access to those environments for defence in depth.

Run

Nothing to install — point your MCP client at npx:

json
{  "mcpServers": {    "mulewatch": {      "command": "npx",      "args": ["-y", "mulewatch"],      "env": {        "ANYPOINT_CLIENT_ID": "your_connected_app_client_id",        "ANYPOINT_CLIENT_SECRET": "your_connected_app_client_secret"      }    }  }}

That block works as-is in Claude Desktop (claude_desktop_config.json), Cursor (.cursor/mcp.json) and OpenClaw. For Claude Code:

bash
claude mcp add mulewatch --env ANYPOINT_CLIENT_ID=... --env ANYPOINT_CLIENT_SECRET=... -- npx -y mulewatch

From a clone instead:

bash
npm installnpm run buildnpm start

The server speaks stdio, which is what MCP clients expect. Start with anypoint_whoami to confirm credentials, business group and scope before anything else.


Tools

Every tool is read-only. All of them accept orgId to override the configured business group.

anypoint_whoami

Confirms which credentials, business group, hosts and environment allowlist the server is running with. No arguments. Call this first when anything fails.

anypoint_list_business_groups

Lists the business groups beneath the credentials' organization, with ids and nesting depth.

json
{ "rootOrgId": "optional-root-organization-id" }

anypoint_list_environments

Lists environments for a business group, filtered by ANYPOINT_ALLOWED_ENVIRONMENTS when set.

json
{ "orgId": "your-business-group-id" }

anypoint_list_deployed_apps

Lists deployed Mule applications for an environment, by environmentId or environmentName.

json
{ "environmentName": "Dev", "target": "all" }
OptionPurpose
targetapplication_manager (default), cloudhub, hybrid, or all
limitMaximum records to return, default 100
includeRawInclude raw API objects in the response
includeErrorsInclude per-target errors when a target endpoint is unavailable or not permitted

application_manager covers CloudHub 2.0 and Runtime Fabric deployments, cloudhub legacy CloudHub, hybrid on-prem Runtime Manager. all queries every target and reports per-target failures instead of aborting.

anypoint_list_app_logs

Lists the latest Runtime Manager logs for an application.

json
{ "environmentName": "Dev", "appName": "my-mule-app" }
OptionPurpose
environmentIdUse instead of environmentName
deploymentIdUse when the app name is ambiguous or already known
specIdA specific Application Manager deployment spec/config id
targetauto (default), application_manager, or cloudhub
limitMaximum log entries, default 100, max 500
offsetApplication Manager log offset, default 0
descendingLatest first, default true
startTime / endTimeApplication Manager time filter, ISO 8601
includeRawInclude the raw API response
includeErrorsInclude failed target errors when target is auto

For CloudHub 2.0 and Runtime Fabric the tool resolves appName to a deployment, resolves the current spec, then reads that spec's logs. For legacy CloudHub it calls the CloudHub logs endpoint directly.

anypoint_get_app_logs_for_analysis

Same sources as above, but returns an analysis-ready payload rather than a raw list. Prefer it when diagnosing something.

json
{ "environmentName": "Dev", "appName": "my-mule-app", "limit": 200, "errorOnly": true }

Takes every option of anypoint_list_app_logs, plus:

OptionPurpose
searchTermsCase-insensitive filters matched against timestamp, priority, message, logger, thread or instance
errorOnlyOnly return ERROR and FATAL lines

The response carries analysis.totalFetched, analysis.totalMatched, analysis.priorityCounts, analysis.loggerCounts, analysis.instanceCounts and analysis.logs. Counts describe everything fetched; logs holds what matched.

anypoint_search_archived_logs

Searches historical logs through the Anypoint Monitoring Archive API, for dates beyond what the live tail can see.

This is the tool the others cannot replace. anypoint_list_app_logs and anypoint_get_app_logs_for_analysis read Runtime Manager's live tail — a small rolling buffer that can scroll out within minutes on a busy application, no matter what startTime/endTime you pass. The archive lands files roughly ten minutes after each ten-minute window closes and keeps them far longer.

Requires Anypoint Monitoring to be enabled for the organization. Without it every call 403s or 404s; fall back to a manual Download Logs export from the Runtime Manager UI.

json
{  "environmentName": "Prod",  "appName": "my-mule-app",  "date": "2026-08-09",  "searchTerms": ["Started product import", "Import finished"]}
OptionPurpose
dateRequired, YYYY-MM-DD (UTC)
endDateOptional inclusive range end, YYYY-MM-DD (UTC), max 7 days total
searchTermsCase-insensitive text filters
errorOnlyOnly return ERROR and FATAL lines
maxEntitiesCap on replica entities probed during a full-scan fallback, default 150, max 300
maxFilesCap on archive files downloaded and parsed, default 100, max 500
limitCap on matched lines returned, default 500, max 2000
includeRawInclude the raw parsed entry alongside the normalized fields

How it finds your logs. The Archive API indexes per replica/pod ({appName}_{replicaId}), not per application, so the replica has to be identified before anything can be read. mulewatch first tries the replica ids visible in the live Runtime Manager tail (entityResolution: "live-replica") — pods are usually long-lived between redeploys, so that same replica normally produced the logs on recent past dates too, and a typical lookup costs a handful of archive calls. If that replica has no files for the requested dates — the application was redeployed since, say — it falls back to listing every replica the app has ever had and probing each (entityResolution: "full-scan"), bounded by maxEntities.

The Archive API allows 60 requests/minute; the client throttles beneath that and backs off on 429. A full-scan fallback across many replicas can take a while, so narrow the date range where you can. The response reports which path was taken and whether any cap truncated the result.

anypoint_list_api_manager_instances

Lists API instances managed by API Manager in an environment.

json
{ "environmentName": "Dev", "assetId": "my-api" }
OptionPurpose
assetIdFilter by Exchange asset id
technologyFilter by technology, e.g. mule4, flexGateway
limit / offsetPagination, default 100 / 0
includeRawInclude raw API objects

anypoint_search_exchange_assets

Searches Anypoint Exchange for assets in the organization.

json
{ "search": "customer", "types": ["rest-api"], "limit": 20 }
OptionPurpose
searchFree-text search over asset names and descriptions
typesFilter by asset type, e.g. rest-api, connector, template, example
limit / offsetPagination, default 50 / 0
includeRawInclude raw API objects

Tech stack

LayerTechnology
RuntimeNode.js 20+, ES modules
LanguageTypeScript 5.7, strict, compiled to dist/
ProtocolModel Context Protocol SDK 1.30, stdio transport
Validationzod 4
AuthAnypoint client_credentials token flow, username/password, or bearer token
Testsnode:test, no runner dependency

Repository layout

text
.├── src/│   ├── index.ts          # bin entry: config check, stdio wiring│   ├── tools.ts          # MCP tool registration and argument schemas│   ├── client.ts         # AnypointClient: auth, org resolution, all API calls│   ├── config.ts         # env-var config, environment allowlist│   ├── normalize.ts      # envelope unwrapping, log normalization, analysis│   ├── archive-parse.ts  # archive log line parsing, date range enumeration│   └── errors.ts         # AnypointApiError and message formatting├── test/                 # unit tests for the pure logic├── docs/│   ├── logo.png          # project mark, used in this README│   └── og-image.png      # social preview card├── server.json           # MCP registry manifest├── PRICING.md            # positioning notes└── .env.example

Verification status

Read paths were exercised against a live Anypoint organization during development:

ToolStatus
anypoint_whoamiVerified live
anypoint_list_business_groupsVerified live
anypoint_list_environmentsVerified live
anypoint_list_deployed_appsVerified live (application_manager; cloudhub/hybrid targets not exercised)
anypoint_list_app_logsVerified live (Application Manager path)
anypoint_get_app_logs_for_analysisVerified live (Application Manager path)
anypoint_search_exchange_assetsVerified live
anypoint_search_archived_logsVerified live — both the live-replica fast path and the full-scan fallback
anypoint_list_api_manager_instancesNot verified — the test connected app lacked the View APIs Configuration scope and the call returned 403

On the application used for that check, the archive held 669 historical replica entities. Searching the current day resolved through the live-replica fast path and probed one of them, finding 127 archive files and parsing 2,859 log lines. Searching a date from before the last redeploy correctly fell through to the full-scan path, which is the slow case the maxEntities cap exists to bound.

Notes

  • Every tool is read-only. There are no deploy, stop, restart or policy-mutation tools, by design — an LLM should not be mutating a production Mule estate, and the official MuleSoft server already covers deployment.
  • Tokens are cached in memory until a minute before expiry and never written to disk.
  • Credentials are read from the environment only; nothing is logged.
  • Anypoint returns bare 403s for missing connected-app scopes. Those are caught and annotated with the scope that is probably missing.
  • EU and other control planes work by overriding ANYPOINT_BASE_URL and ANYPOINT_MONITORING_BASE_URL.

License

Apache-2.0. MuleSoft, Anypoint Platform and CloudHub are trademarks of Salesforce, Inc.; this is an independent project and is not affiliated with or endorsed by Salesforce.


Built by Brahim Bousnguar, a MuleSoft integration engineer — available for platform and agentic-AI consulting.

來源:README.md,提交 016da7a

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.1.2最新Sep 18, 2026
  2. v0.1.1Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分