w3deploy-mcp
v1.0.0
Published
This MCP server lets agentic IDEs deploy generated code directly to your W3DEPLOY backend, which encrypts and pins artifacts to Pinata/IPFS.
Readme
W3DEPLOY MCP Server
This MCP server lets agentic IDEs deploy generated code directly to your W3DEPLOY backend, which encrypts and pins artifacts to Pinata/IPFS.
Tools
connect_w3deploy_mcp- Calls backend
POST /api/mcp/connect
- Calls backend
request_deploy_challenge- Calls backend
POST /api/mcp/challenge - Returns challenge message to sign in-wallet
- Calls backend
deploy_code_to_ipfs- Calls backend
POST /api/mcp/deploy-code - Requires JWT, wallet address, challenge ID and wallet signature
- Calls backend
get_deployment_history- Calls backend
GET /api/sites/:domain - Returns deployment history with chain tx IDs and explorer URLs
- Calls backend
Run (local development)
npm install
npm run build
npm run startOn Windows PowerShell where execution policy blocks npm scripts, run:
npm.cmd install
npm.cmd run build
npm.cmd run startGlobal command setup
This package now exposes a CLI command: w3deploy-mcp.
After publishing to npm (or installing from a git source), install globally:
npm i -g w3deploy-mcpThen any MCP client can use:
{
"mcpServers": {
"w3deploy": {
"command": "w3deploy-mcp",
"env": {
"W3DEPLOY_API_BASE": "https://api.yourdomain.com",
"W3DEPLOY_WALLET_ADDRESS": "YOUR_WALLET_ADDRESS",
"W3DEPLOY_API_TOKEN": "YOUR_PRODUCTION_JWT"
}
}
}
}Environment
W3DEPLOY_API_BASE(optional, defaulthttp://localhost:8080)W3DEPLOY_WALLET_ADDRESS(recommended, current user Algorand wallet address)W3DEPLOY_API_TOKEN(recommended for authenticated MCP calls)W3DEPLOY_EVM_PRIVATE_KEY(optional, enables automatic challenge signing for EVM wallets)
Example MCP client config (portable via npx)
{
"mcpServers": {
"w3deploy": {
"command": "npx",
"args": ["-y", "w3deploy-mcp@latest"],
"env": {
"W3DEPLOY_API_BASE": "https://api.yourdomain.com",
"W3DEPLOY_WALLET_ADDRESS": "YOUR_WALLET_ADDRESS",
"W3DEPLOY_API_TOKEN": "YOUR_PRODUCTION_JWT"
}
}
}
}Example MCP client config (local repository)
{
"mcpServers": {
"w3deploy": {
"command": "npm",
"args": ["run", "start"],
"cwd": "d:/project/w3deploy/mcp",
"env": {
"W3DEPLOY_API_BASE": "http://localhost:8080",
"W3DEPLOY_WALLET_ADDRESS": "YOUR_WALLET_ADDRESS"
}
}
}
}Signing flow
- Call
request_deploy_challengewithjwtTokenandwalletAddress. - Sign the returned
messagewith the wallet app (no mnemonic sharing). - Call
deploy_code_to_ipfswith:challengeIdchallengeSignature- deploy payload (
label,files, etc.)
deploy_code_to_ipfs input example
{
"jwtToken": "<jwt>",
"walletAddress": "<wallet>",
"challengeId": "<challenge id>",
"challengeSignature": "<wallet signature>",
"label": "my-agent-site",
"files": [
{ "path": "index.html", "content": "<h1>Hello</h1>" },
{ "path": "styles.css", "content": "h1 { color: teal; }" }
],
"notes": "Agent deploy",
"env": "production",
"projectName": "my-agent-site",
"appPreset": "static",
"rootDirectory": ".",
"installCommand": "npm install --no-fund --no-audit",
"buildCommand": "npm run build",
"outputDirectory": "dist",
"envVars": [
{ "key": "API_BASE", "value": "https://example.com" }
]
}get_deployment_history input example
{
"jwtToken": "<jwt>",
"walletAddress": "<wallet>",
"domain": "my-agent-site",
"limit": 10
}