{"id":"1db26b8c-bb18-4adc-a2f0-f5b8f6b4f44a","slug":"mulesoft-cookbook","kind":"mcp","name":"mulesoft-cookbook","summary":"Practical MuleSoft recipes — 100+ DataWeave patterns, AI agent integration, CI/CD pipelines, migration guides, and more.","owner":"shakarbisetty","repoUrl":"https://github.com/shakarbisetty/mulesoft-cookbook","license":"MIT","licenseTier":"permissive","trust":"community","stars":42,"match":null,"fewStars":false,"format":"mcp","createdAt":null,"addedAt":"2026-10-14T05:43:16.174Z","logoUrl":"https://avatars.githubusercontent.com/u/239515327?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools","cloud-infra"],"tags":["dataweave","mule4","mulesoft","agentforce","anypoint-platform","api-management","cicd","devops"],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-14T06:47:09.258Z","sample":false,"url":"https://conduits.dev/tools/mulesoft-cookbook","language":"DataWeave","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# MuleSoft Cookbook\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)\n[![MuleSoft](https://img.shields.io/badge/MuleSoft-Anypoint-00A1E0.svg)](https://www.mulesoft.com/)\n[![Recipes](https://img.shields.io/badge/recipes-490%2B-orange.svg)](#whats-inside)\n[![GitHub Stars](https://img.shields.io/github/stars/shakarbisetty/mulesoft-cookbook?style=social)](https://github.com/shakarbisetty/mulesoft-cookbook)\n\n> Practical recipes for MuleSoft developers — DataWeave patterns, error handling, performance tuning, AI agent integration, API management, CI/CD pipelines, migration guides, Salesforce integration, cost optimization, troubleshooting, enterprise architecture, messaging, and connector patterns.\n\n---\n\n## What's Inside\n\n| Section | What You Get | Recipes |\n|---------|-------------|---------|\n| [**DataWeave**](dataweave/) | Transformation patterns, Exchange modules, cheatsheet, anti-patterns | 104 |\n| [**Error Handling**](error-handling/) | Global handlers, retry/circuit breaker, DLQ, transactions, notifications | 51 |\n| [**Performance**](performance/) | Streaming, memory tuning, batch optimization, caching, thread pools | 49 |\n| [**API Management**](api-management/) | Flex Gateway, custom policies, rate limiting, security, governance | 57 |\n| [**AI Agents**](ai-agents/) | MCP, A2A, RAG, Agentforce, inference, Vibes, AI testing, AI gateway | 63 |\n| [**DevOps**](devops/) | CI/CD pipelines, IaC, secrets, deployment, testing, observability | 53 |\n| [**Migrations**](migrations/) | Java versions, runtime upgrades, CloudHub, connectors, architecture | 63 |\n| [**Cost Optimization**](cost-optimization/) | vCore sizing, API consolidation, license audit, TCO comparison | 7 |\n| [**Salesforce**](salesforce/) | Bidirectional sync, Bulk API, CDC, Agentforce, OAuth, Composite API | 9 |\n| [**Troubleshooting**](troubleshooting/) | Thread dumps, OOM debugging, error decoding, deployment failures | 8 |\n| [**Architecture**](architecture/) | API-led patterns, C4E, event-driven, DR strategy, maturity model | 8 |\n| [**Messaging**](messaging/) | Anypoint MQ vs Kafka, FIFO, DLQ replay, circuit breaker, ordering | 7 |\n| [**Connectors**](connectors/) | SAP, Workday, ServiceNow, NetSuite, EDI, SFTP, AS2, database CDC | 8 |\n\n---\n\n## Quick Start\n\n**Pick a section** from the table above, or jump straight to the most popular content:\n\n### DataWeave (most popular)\n\n```dwl\n%dw 2.0\noutput application/json\n---\npayload filter $.status == \"active\"\n    map {\n        name: $.firstName ++ \" \" ++ $.lastName,\n        email: lower($.email)\n    }\n```\n\nBrowse all 104 patterns: **[dataweave/](dataweave/)**\n\n---\n\n## Table of Contents\n\n### DataWeave Patterns (104)\n\n| Category | Patterns | Difficulty |\n|----------|----------|-----------|\n| [Array Manipulation](dataweave/patterns/01-array-manipulation/) | 10 | Beginner to Advanced |\n| [Object Transformation](dataweave/patterns/02-object-transformation/) | 7 | Beginner to Advanced |\n| [String Operations](dataweave/patterns/03-string-operations/) | 6 | Beginner to Intermediate |\n| [Type Coercion](dataweave/patterns/04-type-coercion/) | 4 | Beginner to Advanced |\n| [XML Handling](dataweave/patterns/05-xml-handling/) | 7 | Intermediate to Advanced |\n| [CSV Operations](dataweave/patterns/06-csv-operations/) | 4 | Beginner to Intermediate |\n| [Error Handling](dataweave/patterns/07-error-handling/) | 7 | Beginner to Advanced |\n| [Date/Time](dataweave/patterns/08-date-time/) | 4 | Beginner to Intermediate |\n| [Advanced Patterns](dataweave/patterns/09-advanced-patterns/) | 9 | Advanced |\n| [Real-World Mappings](dataweave/patterns/10-real-world-mappings/) | 6 | Intermediate to Advanced |\n| [Security & Encoding](dataweave/patterns/11-security-encoding/) | 7 | Intermediate to Advanced |\n| [API Response Patterns](dataweave/patterns/12-api-response-patterns/) | 5 | Intermediate to Advanced |\n| [Flat File / Fixed Width](dataweave/patterns/13-flat-file-fixed-width/) | 4 | Intermediate to Advanced |\n| [Lookup & Enrichment](dataweave/patterns/14-lookup-enrichment/) | 4 | Intermediate to Advanced |\n| [Performance Optimization](dataweave/patterns/15-performance-optimization/) | 6 | Advanced |\n| [Event-Driven](dataweave/patterns/16-event-driven/) | 2 | Advanced |\n| [Math & Precision](dataweave/patterns/17-math-precision/) | 2 | Intermediate |\n| [Observability](dataweave/patterns/18-observability/) | 2 | Intermediate |\n| [AI Integration](dataweave/patterns/19-ai-integration/) | 2 | Advanced |\n| [Utility Modules](dataweave/patterns/20-utility-modules/) | 5 | Intermediate to Advanced |\n\n### Additional DataWeave Resources\n\n- [DW 2.x Cheatsheet](dataweave/cheatsheet/dataweave-2x-cheatsheet.md) | [PDF](dataweave/cheatsheet/dataweave-2x-cheatsheet.pdf)\n- [Anti-Patterns & Common Mistakes](dataweave/anti-patterns/common-mistakes.md)\n- [DW 1.0 to 2.0 Migration Guide](dataweave/anti-patterns/dw1-vs-dw2-migration.md)\n- [MEL to DataWeave Guide](dataweave/anti-patterns/mel-to-dataweave.md)\n- [7 Exchange Modules](dataweave/#anypoint-exchange-modules) (96 functions, 213 MUnit tests)\n- [Playground Tips](dataweave/playground/)\n\n### Error Handling (51 recipes)\n\nGlobal handlers, retry patterns, circuit breaker, dead letter queues, async errors, transactions, connector-specific errors, alerting, validation, and recovery patterns.\n\n**[Browse all error handling recipes](error-handling/)**\n\n### Performance (49 recipes)\n\nStreaming strategies, memory/heap tuning, batch optimization, connection pools, caching, threading model, API performance, database tuning, CloudHub sizing, HTTP/2 multiplexing, and monitoring.\n\n**[Browse all performance recipes](performance/)**\n\n### API Management (57 recipes)\n\nFlex Gateway deployment, AI gateway, custom WASM policies, rate limiting, OAuth/JWT/mTLS security, OWASP API Top 10 mapping, MCP/A2A gateway, agent governance, API design patterns, versioning, and analytics.\n\n**[Browse all API management recipes](api-management/)**\n\n### AI Agent Integration (63 recipes)\n\nMCP server/client setup, A2A protocol, advanced MCP (OAuth, streaming, tracing), RAG pipelines, Agentforce actions, inference connector, Vibes prompt engineering and governance, LLM gateway, AI testing, multi-cloud LLMs, and AI security.\n\n**[Browse all AI agent recipes](ai-agents/)**\n\n### DevOps & CI/CD (53 recipes)\n\nCI/CD pipelines (GitHub Actions, GitLab, Jenkins), environment promotion, IaC (Terraform, Helm), secrets management, deployment strategies (blue-green, canary), MUnit testing (batch, async, error, coverage), RTF, observability, and compliance.\n\n**[Browse all DevOps recipes](devops/)**\n\n### Migrations (63 recipes)\n\nJava version upgrades, Mule runtime migrations (3→4, 4.9→4.10, 4.10→4.11), CloudHub 1→2, API spec conversions, connector upgrades, security migrations, monitoring migrations, build tool upgrades, and architectural modernization.\n\n**[Browse all migration recipes](migrations/)**\n\n### Cost Optimization (7 recipes)\n\nvCore right-sizing calculator, API consolidation patterns, usage-based pricing migration, dev sandbox cost reduction, CloudHub vs RTF vs on-prem TCO comparison, license audit checklist, and Anypoint MQ cost optimization.\n\n**[Browse all cost optimization recipes](cost-optimization/)**\n\n### Salesforce Integration (9 recipes)\n\nBidirectional sync with conflict resolution, Bulk API 2.0 partial failure recovery, CDC vs Platform Events decision tree, governor limit-safe batch processing, Agentforce action registration, OAuth patterns, Composite API, Streaming API, and data migration strategies.\n\n**[Browse all Salesforce recipes](salesforce/)**\n\n### Production Troubleshooting (8 recipes)\n\nThread dump analysis, top 30 error messages decoded, memory leak detection step-by-step, deployment failure flowchart, Anypoint Monitoring vs OpenTelemetry, connection pool exhaustion diagnosis, DataWeave OOM debugging, and batch job failure analysis.\n\n**[Browse all troubleshooting recipes](troubleshooting/)**\n\n### Enterprise Architecture (8 recipes)\n\nAPI-led anti-patterns, C4E setup playbook, event-driven architecture with MuleSoft, domain-driven API design, multi-region DR strategy, application network topology, microservices vs API-led, and integration maturity model.\n\n**[Browse all architecture recipes](architecture/)**\n\n### Messaging (7 recipes)\n\nAnypoint MQ vs Kafka honest comparison, FIFO queue patterns, DLQ reprocessing, large payload workarounds, consumer circuit breaker, VM queue vs Anypoint MQ decision tree, and message ordering guarantees.\n\n**[Browse all messaging recipes](messaging/)**\n\n### Connector Patterns (8 recipes)\n\nSAP IDoc processing, Workday custom reports, ServiceNow CMDB integration, NetSuite patterns, database change data capture, SFTP guaranteed delivery, EDI X12/EDIFACT processing, and AS2 message exchange.\n\n**[Browse all connector recipes](connectors/)**\n\n---\n\n## Contributing\n\nWe welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n**Adding a new pattern?** Place it in the appropriate section folder with a README explaining the concept.\n\n**Adding a new section?** Open an issue first to discuss the scope.\n\n---\n\n## License\n\n[MIT](LICENSE) — Copyright (c) 2026 Shakar Bisetty\n\n---\n\nBuilt by [WeavePilot](https://github.com/shakarbisetty) — practical MuleSoft recipes for the community.\n"}