npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mulesoft-doc-mcp

v1.0.2

Published

MCP server for searching and fetching live MuleSoft documentation

Readme

mulesoft-doc-mcp

Even the biggest LLMs have limited knowledge of MuleSoft. As a niche integration platform, details about Anypoint Platform, DataWeave syntax, connector configurations, CloudHub deployment, and API governance are often missing, outdated, or hallucinated in model responses.

This MCP server fixes that by grounding LLMs with real-time, accurate data pulled directly from docs.mulesoft.com. Instead of relying on training data, your AI assistant can search and read the actual documentation on the fly -- covering Mule Runtime, DataWeave, connectors, API Manager, CloudHub 2, and every other MuleSoft product.

Example

Question: How to check if characters in a string meet a specific condition using DataWeave?

The function you're looking for is someCharacter from dw::core::Strings (available since DataWeave 2.4.0).

It checks whether a condition is valid for at least one character in a string.

Signature:

someCharacter(text: String, condition: (character: String) -> Boolean): Boolean

Example — check if a string has any uppercase character:

%dw 2.0
import * from dw::core::Strings
output application/json
---
"someCharacter" someCharacter isUpperCase($)

Output: true

You can pass any condition, e.g.:

  • someCharacter isLowerCase($) — has any lowercase?
  • someCharacter isNumeric($) — has any digit?
  • someCharacter ((c) -> c == "@") — contains an @?

There's also the companion function everyCharacter if you need all characters to match, not just one.

In DataWeave 2.0, checking if the characters in a string meet a specific condition can be achieved in a few different ways depending on your exact requirements (e.g., checking if all characters match, if at least one matches, or evaluating complex custom logic).

Here are the three most effective methods:

1. Using Built-in String Functions (dw::core::Strings)

If you are checking for standard conditions—such as whether all characters are numeric, alphabetic, uppercase, or lowercase—MuleSoft provides built-in utilities in the dw::core::Strings module. These check the entire string at once.

%dw 2.0
output application/json
import * from dw::core::Strings
---
{
    allNumbers: isNumeric("12345"),
    allLetters: isAlpha("MuleSoft"),
    isAlphaNum: isAlphanumeric("Mule12"),
    allLower:   isLowerCase("hello"),
    allUpper:   isUpperCase("WORLD")
}

2. Using Regular Expressions (matches and contains) ...

In DataWeave, checking if characters in a string meet a specific condition can be handled in two main ways depending on your use case: using Regular Expressions (Regex) for pattern matching, or splitting the string into an array of characters for functional checks.

1. The Regex Approach (Best for standard patterns)

%dw 2.0
output application/json
var standardInput = "MuleSoft123"
---
{
    isAllUppercase: standardInput matches /^[A-Z]+$/,
    containsNumbers: standardInput matches /.*[0-9].*/,
    isAlphanumeric: standardInput matches /^[a-zA-Z0-9]+$/
}

2. The Functional Approach (Best for complex logic) ...

The MCP gives a precise, grounded answer pointing to the exact function (someCharacter). Without it, LLMs fall back to verbose workarounds using regex or manual string splitting — technically valid but missing the purpose-built function.


Tools

| Tool | Description | |------|-------------| | search_docs | Search across the entire MuleSoft documentation ecosystem via Algolia. Returns the top 5 results with titles, paths, and snippets. | | get_doc_page | Fetch any MuleSoft doc page and convert it to clean Markdown. Supports all products (Mule Runtime, CloudHub 2, DataWeave, API Manager, Connectors, etc.). For large pages, returns a TOC; use the optional section parameter to fetch a specific section. |

Usage

There are three ways to use this MCP server. Pick the one that fits your situation:

| Option | Best for | Requires | |--------|----------|----------| | A. npx | Individual use, zero setup | Node.js 18+ | | B. Shared HTTP server | Team sharing on the same network | Someone runs the server | | C. Persistent service | Always-on server that survives reboots | OS-level service config |


Option A — npx (quickest)

Cursor spawns the server locally as a subprocess. Nothing to install or run manually.

Add this to your .cursor/mcp.json:

{
  "mcpServers": {
    "mulesoft-docs": {
      "command": "npx",
      "args": ["-y", "mulesoft-doc-mcp"]
    }
  }
}

Restart Cursor and you're done.


Option B — Shared HTTP server

Run a single instance that the whole team connects to by URL. Useful when you want one server serving multiple colleagues.

1. Clone and build:

git clone [email protected]:MuleSoft-Global-Proserv-Consulting-emu/mulesoft-doc-mcp.git
cd mulesoft-doc-mcp
npm install
npm run build

2. Start in HTTP mode:

npm run start:http

The server listens on http://localhost:3000/mcp (override with MCP_PORT env var).

3. Everyone adds this to their .cursor/mcp.json:

{
  "mcpServers": {
    "mulesoft-docs": {
      "url": "http://<server-host>:3000/mcp"
    }
  }
}

Option C — Persistent service

Same as Option B, but the server auto-starts on boot and restarts on crash.

First, clone and build the project (see Option B step 1).

A template plist is included in the repo:

cp com.mulesoft.doc-mcp.plist ~/Library/LaunchAgents/

Edit ~/Library/LaunchAgents/com.mulesoft.doc-mcp.plist and replace /PATH/TO/ with your actual paths, then load it:

launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.mulesoft.doc-mcp.plist

| Action | Command | |--------|---------| | Stop | launchctl bootout gui/$(id -u)/com.mulesoft.doc-mcp | | Restart | bootout then bootstrap again | | Logs | ~/Library/Logs/mulesoft-doc-mcp.log |

Create ~/.config/systemd/user/mulesoft-doc-mcp.service:

[Unit]
Description=MuleSoft Doc MCP Server
After=network.target

[Service]
Type=simple
WorkingDirectory=/PATH/TO/mulesoft-doc-mcp
ExecStart=/usr/bin/node /PATH/TO/mulesoft-doc-mcp/dist/index.js --http
Environment=MCP_PORT=3000
Restart=always
RestartSec=5

[Install]
WantedBy=default.target

Then enable and start:

systemctl --user daemon-reload
systemctl --user enable --now mulesoft-doc-mcp

| Action | Command | |--------|---------| | Stop | systemctl --user stop mulesoft-doc-mcp | | Restart | systemctl --user restart mulesoft-doc-mcp | | Logs | journalctl --user -u mulesoft-doc-mcp -f |

Open PowerShell as Administrator and run:

$action = New-ScheduledTaskAction `
  -Execute "node.exe" `
  -Argument "C:\PATH\TO\mulesoft-doc-mcp\dist\index.js --http" `
  -WorkingDirectory "C:\PATH\TO\mulesoft-doc-mcp"

$trigger = New-ScheduledTaskTrigger -AtLogOn

$settings = New-ScheduledTaskSettingsSet `
  -AllowStartIfOnBatteries `
  -DontStopIfGoingOnBatteries `
  -RestartCount 3 `
  -RestartInterval (New-TimeSpan -Seconds 10)

Register-ScheduledTask `
  -TaskName "MuleSoft Doc MCP" `
  -Action $action `
  -Trigger $trigger `
  -Settings $settings `
  -Description "MuleSoft Doc MCP Server"

| Action | Command | |--------|---------| | Stop | Stop-ScheduledTask -TaskName "MuleSoft Doc MCP" | | Start | Start-ScheduledTask -TaskName "MuleSoft Doc MCP" | | Remove | Unregister-ScheduledTask -TaskName "MuleSoft Doc MCP" |