generate_mini_app_manifest
Generate a complete Base mini app manifest with all required fields including app name, description, category, and domain to streamline development workflow.
Instructions
Generate a complete Base mini app manifest with all required fields.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_name | Yes | Name of your mini app (max 32 chars) | |
| category | Yes | Primary category for the app | |
| description | Yes | App description (max 170 chars) | |
| domain | Yes | Your app domain (e.g., myapp.vercel.app) | |
| tags | No | Search tags (max 5, lowercase, no spaces) |
Implementation Reference
- server.ts:72-107 (registration)Registration of the 'generate_manifest' tool in the ListTools response, including name, description, and input schema for generating the mini app manifest.{ name: 'generate_manifest', description: 'Generate and save the Base mini app manifest file.', inputSchema: { type: 'object', properties: { project_path: { type: 'string', description: 'Path to the project directory', }, app_name: { type: 'string', description: 'Name of your mini app (max 32 chars)', }, description: { type: 'string', description: 'App description (max 170 chars)', }, category: { type: 'string', description: 'Primary category for the app', enum: ['games', 'social', 'finance', 'utility', 'productivity', 'health-fitness', 'news-media', 'music', 'shopping', 'education', 'developer-tools', 'entertainment', 'art-creativity'], }, domain: { type: 'string', description: 'Your app domain (e.g., myapp.vercel.app)', }, tags: { type: 'array', items: { type: 'string' }, description: 'Search tags (max 5, lowercase, no spaces)', }, }, required: ['project_path', 'app_name', 'description', 'category', 'domain'], }, },
- server.ts:567-655 (handler)The main handler implementation for the 'generate_manifest' tool. It constructs a complete Base mini app manifest object, creates the necessary directory, writes the farcaster.json file, and returns success/error messages with next steps.case 'generate_manifest': { const { project_path, app_name, description, category, domain, tags = [] } = args as any; const manifest = { accountAssociation: { header: "", payload: "", signature: "" }, baseBuilder: { allowedAddresses: [""] }, miniapp: { version: "1", name: app_name, homeUrl: `https://${domain}`, iconUrl: `https://${domain}/icon.png`, splashImageUrl: `https://${domain}/splash.png`, splashBackgroundColor: "#000000", webhookUrl: `https://${domain}/api/webhook`, subtitle: description.substring(0, 30), description: description, screenshotUrls: [ `https://${domain}/screenshot1.png`, `https://${domain}/screenshot2.png`, `https://${domain}/screenshot3.png` ], primaryCategory: category, tags: tags.length > 0 ? tags : ["base", "miniapp", "web3"], heroImageUrl: `https://${domain}/hero.png`, tagline: "Built on Base", ogTitle: app_name, ogDescription: description, ogImageUrl: `https://${domain}/og.png`, noindex: true } }; try { // Create .well-known directory const wellKnownDir = path.join(project_path, 'public', '.well-known'); createDirectory(wellKnownDir); // Write manifest file writeFile( path.join(wellKnownDir, 'farcaster.json'), JSON.stringify(manifest, null, 2) ); return { content: [ { type: 'text', text: `# ✅ Manifest Generated Successfully! ## Manifest Details: - **App Name**: ${app_name} - **Category**: ${category} - **Domain**: ${domain} - **Location**: ${path.join(wellKnownDir, 'farcaster.json')} ## Next Steps: 1. **Deploy your app** to get a live URL 2. **Generate accountAssociation** at https://base.dev/preview?tab=account 3. **Update manifest** with the generated credentials 4. **Test validation** at https://base.dev/preview ## Required Images: - Icon: 1024x1024px PNG - Splash: 200x200px PNG - Screenshots: 1284x2778px PNG (portrait) - Hero: 1200x630px PNG - OG Image: 1200x630px PNG Your manifest is ready! 🎉`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `❌ Error generating manifest: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], }; } }
- server.ts:210-214 (helper)Helper function used by the manifest handler to create the public/.well-known directory if it doesn't exist.function createDirectory(dirPath: string) { if (!fs.existsSync(dirPath)) { fs.mkdirSync(dirPath, { recursive: true }); } }
- server.ts:216-220 (helper)Helper function used by the manifest handler to write the manifest JSON file, ensuring the directory exists first.function writeFile(filePath: string, content: string) { const dir = path.dirname(filePath); createDirectory(dir); fs.writeFileSync(filePath, content); }