Skip to main content

@enclz/mcp-server

A Model Context Protocol server that exposes the Agent REST API as eight native tools. Drops into Claude Desktop, Cursor, or any MCP runtime — your agent gets enclz_transfer, enclz_swap, etc. alongside its built-in tools, no HTTP glue code required.

Install

No install step — npx runs it on demand:

npx @enclz/mcp-server

That's the entire installation. The package downloads on first run, caches locally, starts up in well under a second on subsequent runs.

Configure

One environment variable:

ENCLZ_API_KEY=ek_live_...

That's the agent's API key from agent registration. Pass it however your runtime expects environment variables.

Use with Claude Desktop

Edit claude_desktop_config.json (location: ~/Library/Application Support/Claude/claude_desktop_config.json on macOS; %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
"mcpServers": {
"enclz": {
"command": "npx",
"args": ["@enclz/mcp-server"],
"env": {
"ENCLZ_API_KEY": "ek_live_..."
}
}
}
}

Restart Claude Desktop. The new tools appear in the tool palette automatically.

Use with Cursor

Cursor reads the same MCP server configuration format. Add to .cursor/mcp.json in your project (or ~/.cursor/mcp.json for global):

{
"mcpServers": {
"enclz": {
"command": "npx",
"args": ["@enclz/mcp-server"],
"env": { "ENCLZ_API_KEY": "ek_live_..." }
}
}
}

Tools exposed

Tool nameWhat it doesBacked by
enclz_transferSend tokens to a whitelisted recipientPOST /v1/transfer
enclz_swapSwap via JupiterPOST /v1/swap
enclz_depositDeposit to a whitelisted lending protocolPOST /v1/deposit
enclz_withdrawWithdraw from a whitelisted lending protocolPOST /v1/withdraw
enclz_simulateDry-run a transfer or swapPOST /v1/intents/simulate
enclz_balanceCheck current SPL token balanceGET /v1/balance
enclz_limitsCheck policy ceiling and countersGET /v1/limits
enclz_historyRead past activityGET /v1/history

Each tool's input schema is generated from the corresponding REST endpoint's OpenAPI definition, so the MCP runtime's tool-call validation matches the API's input validation exactly.

Example agent prompts

Once the MCP server is wired up, you can write agent prompts that use the tools naturally:

"Pay GjwoT1Hf2Rhet9NEr4D5jgN5VdfpxdmxbbPLLgUrjgyy 0.05 USDC for an RPC call. Memo it 'rpc-call-#a8f2'. If the whitelist budget is exhausted, ask the orchestrator to top up — don't bypass."

The agent calls enclz_transfer and gets back either a confirmation or a structured error. If it gets whitelist_amount_exhausted, the LLM understands the recovery path because the error code is descriptive.

What about the policy ceiling?

The MCP server is just an HTTP client. Every call still goes through the on-chain program's checks. There's no "MCP-level policy" — the policy is the on-chain Anchor program. The MCP server can't grant authority; it just routes requests to the API and returns responses.

This means an agent invoking enclz_transfer is bounded by exactly the same caps and whitelist as the same agent invoking the REST API directly. The MCP server is a packaging convenience, not a trust layer.

Source and contributions

Source: enclz/mcp-server. Issues and PRs welcome.