MuleSoft Code MCP
Remote MCP server for MuleSoft APIs that enables agents to discover operations and execute validated API calls with a fixed low-context tool surface.
README
MuleSoft Code MCP
Model Context Protocol (MCP) is a standardized way for LLMs to use external systems through tools. This repository provides a focused remote MCP server for MuleSoft APIs so agents can discover operations and execute validated API calls with a fixed low-context tool surface.
Design references:
The server supports streamable-http transport via /mcp.
Server in this Repository
| Server | Description | URL |
|---|---|---|
mulesoft-code-mcp |
Search + execute over MuleSoft operations with OAuth and write guardrails | http://127.0.0.1:3000/mcp |
Tools Exposed
| Tool | Purpose | Typical use |
|---|---|---|
search |
Finds ranked operations from Exchange portal + OpenID context | "list assets", "exchange api", "oauth token" |
execute |
Validates and executes operation by operation_id |
Read and write calls with typed validation |
auth_status |
Returns auth status for current caller | Preflight before execute |
Why Better Than Official MCP Patterns
Compared to official/provider MCP servers that expose many endpoint-specific tools, this implementation is better for agent execution quality:
- Lower context pressure: fixed
3tools instead of endpoint-tool explosion. - Better tool selection: agent maps intent with
search, then executes one explicitoperation_id. - Stronger safety: writes require both server policy and per-request confirmation token.
- Better runtime behavior: response truncation, read caching, and persisted catalog cache reduce latency and token waste.
Access from Any MCP Client
If your MCP client supports remote MCP directly:
{
"mcpServers": {
"mulesoft-code-mcp": {
"transport": "streamable_http",
"url": "http://127.0.0.1:3000/mcp",
"headers": {
"x-user-id": "default"
}
}
}
}
If your client needs a command bridge:
{
"mcpServers": {
"mulesoft-code-mcp": {
"command": "npx",
"args": ["mcp-remote", "http://127.0.0.1:3000/mcp"],
"env": {
"MCP_REMOTE_HEADERS": "{\"x-user-id\":\"default\"}"
}
}
}
}
Quick Start
cd mulesoft
npm install
npm run build
npm test
Seed access token from environment:
MULESOFT_ACCESS_TOKEN='<token>' npm run seed:token
Start server:
TOKEN_STORE_PATH=./data/tokens.integration.json \
TOKEN_ENCRYPTION_KEY_BASE64='<seed-output-key>' \
PORT=3000 HOST=127.0.0.1 npm run dev
Smoke test:
curl -sS http://127.0.0.1:3000/healthz
MCP_URL=http://127.0.0.1:3000/mcp USER_ID=default npm run smoke:mcp
Tool Calling Flow
- Call
auth_status. - Call
searchwith intent (for example,list exchange assets). - Pick an
operation_id. - Call
executewith required params. - For writes: call
dry_run=true, then replay withconfirm_write_tokenandALLOW_WRITES=true.
Example search input:
{
"query": "list exchange assets",
"limit": 5
}
Example read execute input:
{
"operation_id": "GET /exchange/api/v2/assets"
}
Example write execute dry run:
{
"operation_id": "DELETE /exchange/api/v2/assets/{assetId}",
"path_params": {
"assetId": "my-asset"
},
"dry_run": true
}
Configuration
Key environment variables:
ALLOW_WRITES(defaultfalse)REQUEST_TIMEOUT_MSMAX_RETRIESCATALOG_CACHE_PATHREAD_CACHE_TTL_MSEXECUTE_MAX_BODY_BYTESEXECUTE_BODY_PREVIEW_CHARS
See .env.example for the full set.
Safety Model
- Mutating methods are blocked unless
ALLOW_WRITES=true. - Mutating calls require
confirm_write_tokenfromdry_runfor exact request replay. - Sensitive headers and body fields are redacted.
Performance Model
- Fixed 3-tool MCP surface to keep context small.
- Persisted catalog cache enables fast startup and asynchronous refresh.
- Conditional refresh for upstream metadata where available.
- Short TTL cache for repeated read calls (
GET/HEAD). - Execute body truncation controls context overhead.
Troubleshooting
- MCP Inspector connect failure: confirm URL is
http://127.0.0.1:3000/mcpand server is running. AUTH_REQUIRED: seed token or complete OAuth bootstrap.- Write blocked: set
ALLOW_WRITES=trueand use returnedconfirm_write_token. - Sparse search results: include concrete resource terms (
exchange,assets,oauth).
Development
- Source:
src - Tests:
tests - References:
REFERENCES.md
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。