inventory
Provides read-only tools for querying inventory data, retrieving SKU status, and searching indexed documents via pgvector. The MCP server exposes inventory schema and safe SQL/RAG capabilities against a PostgreSQL backend.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@inventoryWhat's the status of SKU-0009 and what does the critical SKU policy say?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Inventory Copilot
Agente de IA generativa para consultar y operar un sistema de inventario con lenguaje natural, de forma segura, auditable y agnóstica de proveedor: corre a $0 en local (LM Studio / OmniRoute) y en Amazon Bedrock cambiando una variable.
Estado: 🚧 v0.3 — agente con tools, RAG, MCP server y router de modelos.
Qué demuestra
Capacidad | Implementación | Estado |
Capa LLM multiproveedor | LM Studio · OmniRoute · Bedrock Converse | ✅ |
Text-to-SQL seguro | Validador | ✅ |
RAG | PostgreSQL + pgvector (equivalente a Aurora pgvector), chunks por sección | ✅ |
Agente con herramientas + MCP | Tool calling nativo · SQL, ficha de SKU, RAG · MCP server (stdio) | ✅ |
Órdenes de compra | Propuesta por el agente con aprobación humana | ⏳ |
Guardrails | PII, prompt injection (directa e indirecta) · Bedrock ApplyGuardrail | ⏳ |
Router de modelos (cascada) | Modelo rápido por defecto, escala a uno más capaz ante fallos detectables | ✅ |
Evaluación | Execution accuracy (SQL), hit@k/MRR (RAG), tool selection (agente) · faithfulness y LLM-as-judge pendientes | 🟡 |
Observabilidad | Tokens, latencia p95 y costo estimado por consulta | ⏳ |
IaC | AWS CDK + cdk-nag ( | ⏳ |
Related MCP server: MCP SQL Server
Arquitectura
Usuario ─► API ─► Agente ─► Capa LLM ─┬─► LM Studio (local)
│ ├─► OmniRoute (modelos gratuitos, fallback)
│ └─► Amazon Bedrock (Converse)
├─ Tool SQL ─► SQL guard ─► PostgreSQL (rol read-only)
├─ Tool RAG ─► pgvector
├─ MCP server de inventario
└─ Tool orden de compra ─► aprobación humanaArranque rápido (5 min)
git clone https://github.com/mcorona/AI-projects-inventory-copilot.git
cd AI-projects-inventory-copilot
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
docker compose up -d
python -m pytest -q
python -m scripts.smoke_test
python -m scripts.generate_data # datos sinteticos reproducibles (seed 42)
python -m scripts.ingest_docs # indexa data/docs en pgvector (embeddings bge-m3)
python -m evals.run_sql_eval # execution accuracy del text-to-SQL
python -m evals.run_rag_eval # hit@k y MRR de la recuperacion
python -m evals.run_agent_eval # seleccion de herramientas del agente
python -m src.agent --trace "¿Cómo está el SKU-0009 y qué dice la política de SKUs críticos?"En LM Studio: carga el modelo de chat y el de embeddings, y activa el servidor local (pestaña Developer → Start Server, puerto 1234).
Modelos recomendados (MacBook M5 Pro, 35 GB RAM unificada)
Rol | Modelo | Memoria aprox. (Q4) |
Chat / SQL (principal) | Qwen3.6-35B-A3B (MoE) | ~20 GB |
Chat (alternativa) | gpt-oss-20b | ~12 GB |
Embeddings | bge-m3 (multilingüe, 1024 dim) | ~1 GB |
Cambiar de proveedor
LLM_PROVIDER=omniroute python -m scripts.smoke_test --no-embed
LLM_PROVIDER=bedrock python -m scripts.smoke_testRouter en cascada (modelo rápido primero, escala al capaz si falla):
ROUTER_TIERS="omniroute:kr/minimax-m2.1,lmstudio:qwen/qwen3.6-35b-a3b" \
python -m evals.run_sql_eval --provider routerMCP server
Las tres herramientas del agente (query_inventory, get_sku_status, search_documents) y el
esquema (inventory://schema) se exponen por MCP, todas de solo lectura:
python -m src.mcp_server # stdioEl repo incluye .mcp.json, así que Claude Code lo detecta al abrir el proyecto (pide aprobarlo la primera vez). Su contenido:
{
"mcpServers": {
"inventory": {
"command": ".venv/bin/python",
"args": ["-m", "src.mcp_server"]
}
}
}Resultados actuales
Eval | LM Studio · Qwen3.6-35B-A3B | OmniRoute · minimax-m2.1 |
Text-to-SQL, execution accuracy (30 preguntas) | 100.0% · p50 15 s | 93.3% · p50 1.7 s |
Selección de herramientas del agente (12 tareas) | 100% · p50 5.4 s | 100% · p50 4.1 s |
Recuperación RAG, bge-m3 (15 preguntas) | hit@1 100% · MRR 1.0 | — |
Muestras pequeñas: una pregunta mueve 3–8 puntos. Ver los ADR para limitaciones.
Decisiones de arquitectura
Datos
Todos los datos son sintéticos. Nunca envíes datos reales a proveedores gratuitos.
Licencia
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP server that answers questions about turva.dev from its published data. Five tools return JSON: the service catalog with prices, contact and operator details, engagement principles and dated agent-readiness and security evidence with verification links. Connect over Streamable HTTP. You need no API key. The server does not scan other websites or run audits.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Read-only developer, date, finance, and text utilities. Authless remote MCP server by Clean.tools.
Read-only MCP server for Muovi, Argentina's trust-first local services marketplace (6 tools).
Related MCP Servers
- AlicenseAqualityDmaintenanceExposes SQLite database query tools and markdown document resources over JSON-RPC 2.0 stdio transport, enabling AI assistants to read and search documents and execute read-only SQL queries.81MIT
- AlicenseNot gradedqualityCmaintenanceRead-only MCP server for SQL databases (SQLite/PostgreSQL) that enables listing tables, describing schemas, and executing SELECT queries with safety guardrails.MIT
- FlicenseNot gradedqualityCmaintenanceEnables local MCP-compatible clients, such as Claude Desktop, to query an AWS Athena database with read-only tools for listing tables, describing schemas, running SELECT queries, sampling rows, and getting row counts.-
- AlicenseAqualityCmaintenanceEnables MCP clients such as Codex to safely inspect a MySQL database over stdio by listing tables, describing schemas and indexes, and running only validated single read-only SELECT/CTE queries plus JSON EXPLAIN plans. Queries execute inside read-only transactions with strict AST-based rejection of writes, multi-statements, and other risky operations, and results come back as structured JSON.6105 npmMIT