Skip to main content

No project description provided

Project description

MCP-Image-Analysis4Puzzle

A specialized MCP server that uses Gemini 2.5 Pro to analyze and solve mathematical puzzles for children's education.

Overview

MCP-Image-Analysis4Puzzle is a dedicated server that helps teachers, parents, and students analyze mathematical puzzles through image processing. Using Google's Gemini 2.5 Pro model, it provides detailed, grade-appropriate analysis and solutions for various types of mathematical puzzles.

Key Features

Mathematical Subject Analysis

  • Number Sense & Operations (counting, arithmetic, fractions)
  • Geometry & Spatial Reasoning (shapes, patterns, transformations)
  • Algebra & Early Functions (sequences, patterns, simple equations)
  • Measurement & Data (time, money, graphs)
  • Logic & Problem Solving (visual puzzles, word problems)

Educational Support

  • Grade-level appropriate analysis (K-6)
  • Common Core Standards alignment
  • Step-by-step solution guidance
  • Visual learning aids suggestions
  • Extension activities

Smart Validation

  • Automatic puzzle type detection
  • Grade-level appropriateness check
  • Mathematical content verification
  • Learning objective identification

Requirements

  • Python 3.11 or higher
  • Google Gemini API key
  • MCP-compatible client (Cursor, Claude Desktop, etc.)
  • Internet connection for API access

Installation

  1. Clone the repository:
git clone https://github.com/your-username/mcp-image-analysis4puzzle.git
cd mcp-image-analysis4puzzle
  1. Set up a virtual environment:
# Using venv
python -m venv .venv
source .venv/bin/activate  # On Unix/macOS
.venv\Scripts\activate     # On Windows

# Or using uv (recommended)
uv venv
source .venv/bin/activate  # On Unix/macOS
.venv\Scripts\activate     # On Windows
  1. Install dependencies:
# Using pip
pip install -r requirements.txt

# Or using uv (recommended)
uv pip install -r requirements.txt
  1. Create and configure your environment file:
cp .env.example .env
  1. Add your Gemini API key to .env:
GEMINI_API_KEY=your_api_key_here

Configuration

For Cursor IDE

The server is automatically configured when using Cursor IDE.

For Claude Desktop

Add to your claude_desktop_config.json:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
    "mcpServers": {
        "mcp-image-analysis4puzzle": {
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/mcp-image-analysis4puzzle",
                "run",
                "server.py"
            ],
            "env": {
                "GEMINI_API_KEY": "your_api_key_here"
            }
        }
    }
}

Usage

  1. Start your MCP-compatible client (Cursor or Claude Desktop)
  2. Upload a mathematical puzzle image
  3. Ask for analysis using commands like:
    • "Analyze this math puzzle for grade 2"
    • "Help solve this geometry puzzle"
    • "What math concepts are in this puzzle?"

Example Analysis

When you upload a puzzle image, you'll receive:

PUZZLE ANALYSIS

Subject: Number Sense & Operations
Grade Level: 2nd Grade (7-8 years)
Topic: Skip Counting & Patterns

Mathematical Concepts:
- Pattern recognition
- Skip counting by 2s
- Number relationships
- Early multiplication concepts

Step-by-Step Solution:
1. Observe the number sequence
2. Identify the pattern
3. Apply the pattern rule
4. Verify the answer

Learning Standards:
- CCSS.MATH.CONTENT.2.OA.C.3
- CCSS.MATH.PRACTICE.MP7
- CCSS.MATH.PRACTICE.MP8

Visual Aids:
- Number line
- Counting objects
- Pattern blocks
- Drawing tools

Extension Activities:
1. Create similar patterns
2. Find patterns in real life
3. Connect to multiplication
4. Practice with different numbers

Development

To run the server in development mode:

fastmcp dev server.py

This starts the server and makes the MCP Inspector available at http://localhost:5173

Project Structure

mcp-image-analysis4puzzle/
├── server.py           # Main MCP server implementation
├── prompts.py         # Gemini prompt templates
├── utils.py           # Utility functions
├── requirements.txt   # Python dependencies
├── .env              # Environment configuration
└── README.md         # Documentation

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

MIT License

Acknowledgments

  • Google Gemini API
  • FastMCP Framework
  • Claude AI Platform
  • Cursor IDE Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mseep_mcp_server_gemini_image_analyzer-0.1.1.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file mseep_mcp_server_gemini_image_analyzer-0.1.1.tar.gz.

File metadata

File hashes

Hashes for mseep_mcp_server_gemini_image_analyzer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7fcb22445f00154259c3a579b304127181f577afa9e44aeefaa0dd3d4da7e4b2
MD5 17b0064ff800262f67c671b017b063c0
BLAKE2b-256 d4f9ce075c61f8ff8b0634d2a696cf0e85d09c262e2b37b17b6dbf3d87046c27

See more details on using hashes here.

File details

Details for the file mseep_mcp_server_gemini_image_analyzer-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_mcp_server_gemini_image_analyzer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 10eb9d8e6d5285ee6c868d07d6ced7b4eeaa6bcd31aa37c725ce233381726b46
MD5 a4c3abcad5c3877944b90e7dadcef071
BLAKE2b-256 04c6b5accebbb047fe60bdc2e2d98abefb21619850c672ff24699790ae579f15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page