Skip to main content
Glama

InventarioDB

by diegogfhjk

InventarioDB

Descripción

Este proyecto pone en marcha un pequeño servidor MCP (Model Context Protocol) que gestiona un inventario de productos usando SQLite.
Cada función decorada con @mcp.tool() expone una "herramienta" que puede ser invocada por un cliente MCP para crear, leer, actualizar o eliminar productos.

Características

  • Gestión completa de inventario (CRUD)
  • Base de datos SQLite para almacenamiento persistente
  • API RESTful a través de MCP
  • Fácil integración con clientes MCP
  • Validación de datos
  • Manejo de errores robusto

Requisitos

  • Python 3.7 o superior
  • SQLite (incluido en la biblioteca estándar de Python)

Instalación

  1. Clona o descarga este repositorio:
    git clone https://github.com/diegogfhjk/mcp.git cd mcp
  2. Instala Claude desktop: https://claude.ai/download
  3. Instala las dependencias:
    pip install uv uv add "mcp[cli]" uv run mcp install main.py

API de Herramientas MCP

Crear Producto

@mcp.tool() def crear_producto(nombre: str, cantidad: int, precio: float) -> dict

Crea un nuevo producto en el inventario.

Obtener Producto

@mcp.tool() def obtener_producto(id: int) -> dict

Obtiene la información de un producto específico.

Actualizar Producto

@mcp.tool() def actualizar_producto(id: int, nombre: str = None, cantidad: int = None, precio: float = None) -> dict

Actualiza la información de un producto existente.

Eliminar Producto

@mcp.tool() def eliminar_producto(id: int) -> bool

Elimina un producto del inventario.

Estructura del Proyecto

inventariodb/ ├── server.py # Servidor MCP principal ├── database.py # Configuración y operaciones de base de datos ├── requirements.txt # Dependencias del proyecto └── README.md # Este archivo
-
security - not tested
F
license - not found
-
quality - not tested

A small MCP server that manages a product inventory using SQLite, providing CRUD operations through exposed MCP tools.

  1. Descripción
    1. Características
      1. Requisitos
        1. Instalación
          1. API de Herramientas MCP
            1. Crear Producto
            2. Obtener Producto
            3. Actualizar Producto
            4. Eliminar Producto
          2. Estructura del Proyecto

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              An MCP server that provides safe, read-only access to SQLite databases through MCP. This server is built with the FastMCP framework, which enables LLMs to explore and query SQLite databases with built-in safety features and query validation.
              Last updated -
              49
              Python
            • A
              security
              A
              license
              A
              quality
              An MCP server that provides tools for interacting with Supabase databases, storage, and edge functions.
              Last updated -
              14
              41
              JavaScript
              MIT License
            • -
              security
              A
              license
              -
              quality
              This MCP server connects clients with Shopify store data, enabling retrieval of product and customer information via exposed tools.
              Last updated -
              2
              Python
              MIT License
            • -
              security
              -
              license
              -
              quality
              An MCP server that allows working with MySQL databases by providing tools for executing read-only SQL queries, getting table schemas, and listing database tables.
              Last updated -
              1
              JavaScript

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/diegogfhjk/mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server