Initial Big Banana MCP project
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import { mkdir } from 'node:fs/promises';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
||||
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
|
||||
|
||||
const outputDirectory = resolve(process.cwd(), 'generated');
|
||||
await mkdir(outputDirectory, { recursive: true });
|
||||
|
||||
const client = new Client({ name: 'big-banana-mcp-smoke-test', version: '0.1.0' });
|
||||
const transport = new StdioClientTransport({
|
||||
command: 'node',
|
||||
args: ['dist/index.js'],
|
||||
cwd: process.cwd(),
|
||||
stderr: 'inherit',
|
||||
});
|
||||
|
||||
try {
|
||||
await client.connect(transport);
|
||||
|
||||
const tools = await client.listTools();
|
||||
console.log(JSON.stringify({ tools: tools.tools.map(tool => tool.name) }, null, 2));
|
||||
|
||||
const configStatus = await client.callTool({ name: 'nano_banana_config_status', arguments: {} });
|
||||
console.log(JSON.stringify({ configStatus }, null, 2));
|
||||
|
||||
console.log('Starting nano_banana_generate...');
|
||||
const result = await client.callTool({
|
||||
name: 'nano_banana_generate',
|
||||
arguments: {
|
||||
prompt:
|
||||
'Design a square logo for a project called Big Banana. Show a single anthropomorphic banana character, extremely muscular, confident, heroic, and stylish in a chad pose, but still clean and logo-friendly. Background in mature comic-book style with bold halftone texture, dynamic burst shapes, inked shadows, warm yellow-orange-red palette, and strong black linework. Keep it visually punchy, iconic, and readable at small sizes. Center composition. No extra characters. Include subtle room for branding, but do not render readable text. Make it feel like a premium modern mascot logo rather than a generic illustration.',
|
||||
model: 'gemini-2.5-flash-image',
|
||||
aspectRatio: '1:1',
|
||||
imageSize: '1K',
|
||||
candidateCount: 1,
|
||||
outputDirectory,
|
||||
outputPrefix: 'big-banana-logo',
|
||||
},
|
||||
});
|
||||
|
||||
console.log('Finished nano_banana_generate.');
|
||||
console.log(JSON.stringify({ result }, null, 2));
|
||||
} finally {
|
||||
await transport.close();
|
||||
}
|
||||
Reference in New Issue
Block a user