MCP-Server-V3

MCP-Server-V3

3.3

The MCP Server AI Chrome Extension allows users to perform complex BODMAS operations via a lightweight Chrome Extension paired with a Flask-based MCP Server. It offers real-time computation of mathematical expressions with a focus on easy communication and user interaction.

MCP Server AI Chrome Extension

A lightweight AI-powered Chrome Extension connected to a Flask-based MCP Server, enabling users to perform complex BODMAS (Bracket, Order, Division, Multiplication, Addition, Subtraction) operations directly from the browser.


✨ Features

  • šŸ“š Solve complex mathematical expressions with full BODMAS hierarchy.
  • ⚔ Instant real-time computation via a backend AI MCP server.
  • 🧠 Server processes user input with decision-making and memory modules.
  • 🌐 Simple and clean Chrome Extension interface.
  • šŸ”Œ Easy communication between Chrome Extension and Flask API server.

šŸ—ļø Project Structure

MCP-Server-V3/
│
ā”œā”€ā”€ flask-api/
│   ā”œā”€ā”€ action.py           # Handles mathematical operations
│   ā”œā”€ā”€ decision.py         # Decides actions based on parsed user input
│   ā”œā”€ā”€ memory.py           # Maintains session memory and history
│   ā”œā”€ā”€ mcp_server.py       # Main Flask server running the API
│   ā”œā”€ā”€ mcp_client.py       # Client utilities (if needed)
│   ā”œā”€ā”€ models.py           # Defines data models for input/output
│   ā”œā”€ā”€ perception.py       # Parses and understands user queries
│   └── requirements.txt    # Python dependencies
│
ā”œā”€ā”€ chrome-extension/
│   ā”œā”€ā”€ manifest.json       # Chrome extension manifest
│   ā”œā”€ā”€ popup.html          # Extension popup frontend
│   ā”œā”€ā”€ popup.js            # JS logic to interact with backend server
│
ā”œā”€ā”€ requirements.txt        # Top-level requirements
│
└── README.md               # šŸ“„ (You are here!)

šŸš€ How It Works

  1. User Interaction:

    • User opens the Chrome Extension popup.
    • Enters a math expression (e.g., 5 * (3 + 2) - 4 / 2).
  2. Chrome Extension (Frontend):

    • Captures the user input.
    • Sends a POST request to the Flask MCP Server API.
  3. Flask API (Backend Server):

    • Parses the input via perception.py.
    • Uses decision.py and action.py to compute the correct BODMAS result.
    • Returns the final output back to the Chrome Extension.
  4. Result Display:

    • Extension receives the response.
    • Displays the computed answer to the user in the popup.

šŸ› ļø Installation Guide

1. Set Up the MCP Server

# Clone the repo
git clone https://github.com/shettysaish20/MCP-Server-V3.git
cd MCP-Server-V3/flask-api

# Install Python dependencies
pip install -r requirements.txt

# Run the server
python mcp_client.py

By default, server runs at: http://localhost:5000/


2. Set Up the Chrome Extension

  • Open chrome://extensions/ in Chrome.
  • Enable Developer Mode.
  • Click Load unpacked and select the chrome-extension/ folder.
  • Extension will appear in the browser toolbar.

3. Usage

  • Click on the MCP extension icon.
  • Type a BODMAS-based math query.
  • View instant computed results!

šŸ“¦ Dependencies

  • Backend (Python):

    • Flask
    • Flask-Cors

    (All backend libraries are listed in requirements.txt.)

  • Frontend (Extension):

    • Pure JavaScript + HTML/CSS (no external libraries).

šŸš€ Running

Extension Running


šŸ“„ License

MIT License.
Feel free to modify, extend, and enhance as you wish!


šŸ‘Øā€šŸ’» Author

Built with ā¤ļø by Saish Shetty