MCP Server
Deploy content to IPFS with the Model Context Protocol. A lightweight, agent-first server with educational tooling, wallet management, and 402 Payment Protocol support.
Quick Start
One installer handles everything — tool selection, wallet setup, and Claude Code configuration.
Run the installer
Interactive setup: choose tool categories, set up a wallet (generate new or import existing), and configure Claude Code — all in one flow.
npx glashaus-mcpFund your wallet
If you generated a new wallet, the installer shows your address and a link to the Base Sepolia faucet. Free tier: 1-day pins up to 100 MB cost nothing — no funding needed to test.
Restart Claude Code and upload
Claude shows cost estimate, you confirm, it signs the x402 payment and pins to IPFS.
"Upload my project to IPFS"Claude Desktop (manual config)
The installer handles this automatically for supported clients. For manual setup, edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"glashaus": {
"command": "node",
"args": ["~/.glashaus-mcp/server.js"],
"env": { "GLASHAUS_WALLET_KEY": "0x..." }
}
}
}Wallet Setup
Glashaus uses the x402 payment protocol. The installer walks you through wallet setup in under a minute — generate a fresh key or import your own.
Generate a New Wallet
The installer generates a fresh EVM keypair using viem, shows your address, and provides a link to the Base Sepolia faucet. Key is stored in Claude Code settings — never leaves your machine.
Import Existing Key
Paste your 0x… private key during setup. Input is masked. The installer validates the format and derives your address before saving.
Automatic x402 Signing
When Glashaus returns a 402 payment challenge, the MCP server signs it locally with your key and retries — cost preview and user confirmation first, then fully autonomous.
Non-Custodial
Your private key is stored in Claude Code's settings file on your device. The Glashaus server never sees it — only your signed payment headers.
Settlement: Glashaus operates a server-side receiving wallet (SERVER_WALLET_ADDRESS). Your wallet pays Glashaus on each upload — settlement is on-chain via USDC on Base.
10 Tools Across 3 Categories
Educational Tools
4 toolsLearn how deployment, payments, and wallets work.
explain_deployment_flow
Comprehensive guide to the entire deployment process, from file upload to CID generation and DHT distribution.
explain_x402_payment
Understand the 402 Payment Protocol on Base blockchain, including signature flow and USDC transfers.
explain_wallet_setup
Step-by-step wallet setup guide for Base Testnet or Mainnet with faucet links and balance checks.
Parameters:
- include_testnet (boolean, optional)
get_deployment_api
Full API reference with code examples for TypeScript, Python, and REST endpoints.
Wallet Management
3 toolsSetup and manage crypto wallets for payments.
setup_wallet
Get a step-by-step checklist for setting up a new wallet on Base Sepolia or Mainnet.
Parameters:
- network (string: base-sepolia | base-mainnet)
import_wallet
Import an existing wallet using a private key (66 character hex string with 0x prefix).
Parameters:
- private_key (string)
- network (string: base-sepolia | base-mainnet)
get_wallet_info
Check your wallet balance, network status, and whether you have enough funds to deploy.
Deployment & Monitoring
3 toolsDeploy files and monitor distribution on IPFS.
deploy_files
Deploy files or directories to IPFS with automatic 402 Payment processing, returns CID and gateway URL.
Parameters:
- file_path (string)
get_analytics
View deployment analytics including total views, bandwidth usage, and per-day breakdowns.
Parameters:
- cid (string)
- days (number, optional, default: 7)
get_deployment_status
Check if content is stored locally and how many providers have it on the DHT network.
Parameters:
- cid (string)
User Workflows
First-Time User
- 1Run
npx glashaus-mcp— guided setup with wallet generation - 2Fund wallet via faucet link shown in installer (or skip for free tier)
- 3Learn the platform with
explain_deployment_flow - 4Upload files with
upload_files
Experienced User
- 1Deploy directly:
deploy_files - 2Get analytics:
get_analytics - 3Check status:
get_deployment_status
Code Examples
TypeScript/JavaScript
import { handleToolCall } from 'glashaus-mcp/deploy-agent'
async function deploy() {
// Learn deployment process
const flow = await handleToolCall('explain_deployment_flow', {})
console.log(flow.explanation)
// Setup wallet
const wallet = await handleToolCall('setup_wallet', {
network: 'base-sepolia'
})
console.log(wallet.checklist)
// Import wallet
const imported = await handleToolCall('import_wallet', {
private_key: '0x...',
network: 'base-sepolia'
})
// Deploy files
const result = await handleToolCall('deploy_files', {
file_path: './my-site'
})
console.log(`✓ Deployed to ${result.url}`)
console.log(`CID: ${result.cid}`)
console.log(`Cost: ${result.cost}`)
}REST API (Direct)
The MCP server wraps the same REST endpoints. You can call them directly:
# 1. Get pricing first
curl https://glashaus.io/api/pricing
# 2. Deploy with x402 payment header
curl -X POST https://glashaus.io/api/deploy \
-H "Content-Type: application/octet-stream" \
-H "X-Payment: <signed-payment-json>" \
--data-binary @./file.htmlTesting & Development
Run All Tests
npm testInteractive Agent
Run an interactive agent session that walks through wallet setup and file deployment end-to-end.
npm run agentWatch Mode Tests
npx vitestArchitecture
File Structure
packages/glashaus-mcp/ ├── src/ │ ├── cli.ts # Interactive installer (npx glashaus-mcp) │ ├── server.ts # MCP stdio transport entry point │ ├── deploy-agent.ts # Tool definitions + handler │ └── lib/ │ └── GlasshausAgent.ts # x402 HTTP client ├── package.json # Published as glashaus-mcp on npm └── build.js # esbuild config Build Output: dist/ ├── cli.js # Installer binary (bin: glashaus-mcp) └── server.js # MCP server binary (bin: glashaus-mcp-server)
Tool Exports
export const tools: Tool[] // Array of 10 MCP tool definitions
export function handleToolCall(
toolName: string,
input: Record<string, unknown>
): Promise<unknown>Resources & Links
Ready to Deploy?
Install the MCP server, configure Claude Desktop, and start deploying content to IPFS with AI assistance.