Nano Banana Pro
Agent skill for nano-banana-pro
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a FastMCP quickstart project demonstrating the Model Context Protocol (MCP) server implementation using FastMCP 2.0. The repository contains two MCP servers:
FastMCP Server Pattern: The codebase follows FastMCP's decorator-based pattern where a single
FastMCP instance (mcp) serves as the server object, and functionality is registered using decorators:
@mcp.tool - Defines callable tools that LLMs can invoke@mcp.resource - Exposes data resources (static or templated URIs)@mcp.prompt - Registers reusable prompt templatesThe server in
echo.py demonstrates all three decorator types with echo functionality.
prompt_enhancer.py is a comprehensive MCP server designed to improve prompts for Claude Code:
Tools (6 functions):
enhance_prompt - Main enhancement function with category support (coding/debugging/refactoring/testing)add_technical_context - Adds language, framework, file pathsmake_specific - Transforms vague prompts into specific, actionable onesadd_best_practices - Adds coding standards and constraintsanalyze_prompt - Scores and analyzes prompt quality (0-100 scale)compare_prompts - Side-by-side comparison of original vs enhancedResources (4 endpoints):
prompts://best-practices - Comprehensive guide for writing effective promptsprompts://examples/{category} - Examples for coding, debugging, refactoring, testingprompts://templates/{task_type} - Ready-to-use templates (create_function, fix_bug, etc.)prompts://anti-patterns - Common mistakes to avoidPrompts (3 templates):
enhance-for-claude - Base template for prompt enhancementadd-context-template - Template for adding technical contextmake-actionable-template - Template for making prompts concreteLocal development with MCP Inspector (recommended for testing):
# Echo server fastmcp dev echo.py # Prompt Enhancer server fastmcp dev prompt_enhancer.py
This runs the server via
uv run subprocess with the MCP Inspector for interactive testing. Note: This command only supports STDIO transport.
Run server directly in current environment:
# Echo server python echo.py # or python3 echo.py # Prompt Enhancer server python prompt_enhancer.py
By default, runs with STDIO transport.
Run with HTTP transport (for web-based access):
fastmcp run echo.py --transport http --port 8000 # or in code, modify echo.py to include: # mcp.run(transport="http", host="127.0.0.1", port=8000)
Run with SSE transport (legacy):
fastmcp run echo.py --transport sse --port 8000
In-memory testing (fastest, no network/subprocess):
from fastmcp import Client import asyncio async def main(): # Import your server from echo import mcp # Create in-memory client async with Client(mcp) as client: # Test ping assert await client.ping() # List and test tools tools = await client.list_tools() result = await client.call_tool("echo_tool", {"text": "Hello"}) print(result) asyncio.run(main())
Testing with HTTP client:
from fastmcp import Client import asyncio async def main(): async with Client("http://localhost:8000/mcp/") as client: assert await client.ping() result = await client.call_tool("echo_tool", {"text": "Hello"}) print(result) asyncio.run(main())
Transport Mechanisms: FastMCP supports multiple transports:
Server Lifecycle: Always use
if __name__ == "__main__": block with mcp.run() for compatibility with various MCP clients.
Resource URIs: Resources support both static (
echo://static) and templated URIs (echo://{text}) for dynamic content.
This repository is designed for FastMCP Cloud deployment:
After installing the Prompt Enhancer server in Claude Code:
fastmcp install claude-code prompt_enhancer.py --server-name "Prompt Enhancer"
You can use it to improve your prompts:
Enhance a vague prompt:
Analyze prompt quality:
Get best practices:
See examples:
Get templates:
Before asking Claude Code to write code:
analyze_prompt to check your prompt qualityenhance_prompt to get suggestionsFor testing: See
HOW_TO_TEST.md for detailed testing instructions and examples.
HOW_TO_TEST.md