mcp-server-demo
Provides tools to query a local SQLite database, including search customers and get order by id, and exposes the database schema as a resource.
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., "@mcp-server-demosearch customers where name is John"
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.
Objetivo
Demostrar dominio del protocolo abierto que está estandarizando cómo los LLM acceden a herramientas y datos externos. En vez de acoplar tools a un framework concreto, se construye un servidor MCP reutilizable por cualquier cliente compatible (Claude Desktop, el sistema multi-agente de este portfolio, IDEs, etc.).
El servidor expone, como mínimo:
Tools — acciones invocables: consultar una base de datos local (SQLite) y llamar a una API externa (ej. clima, tipo de cambio, o una API pública de datos).
Resources — datos legibles por el modelo (ej. el esquema de la base, un catálogo).
(Opcional) Prompts — plantillas de prompt reutilizables parametrizadas.
Related MCP server: MCP Server
Stack tecnológico
Opción A — Python: SDK oficial
mcp(conFastMCP) — recomendado por rapidez de desarrolloOpción B — TypeScript:
@modelcontextprotocol/sdk— útil si se quiere mostrar versatilidadTransporte:
stdiopara uso local con clientes de escritorio; Streamable HTTP para exposición remotaBase de datos: SQLite (con un dataset de ejemplo sembrado)
API externa: una API pública sin fricción (ej. Open-Meteo para clima, o exchangerate.host)
Validación: Pydantic (Python) o Zod (TS)
Cliente de prueba: MCP Inspector (
npx @modelcontextprotocol/inspector) y/o Claude DesktopTesting / calidad: pytest (o vitest), ruff/black (o eslint/prettier)
Estructura de carpetas (variante Python)
mcp-server-demo/
├── README.md
├── pyproject.toml
├── .env.example
├── data/
│ ├── seed.sql # Esquema + datos de ejemplo
│ └── demo.db # SQLite generada (git-ignored)
├── src/
│ ├── server.py # Entry point: instancia FastMCP y registra todo
│ ├── config.py
│ ├── tools/
│ │ ├── db_tools.py # query_customers, get_order_by_id, etc.
│ │ └── api_tools.py # get_weather, get_exchange_rate, etc.
│ ├── resources/
│ │ └── schema.py # Expone el esquema de la DB como resource
│ └── db/
│ └── connection.py # Conexión y helpers (queries parametrizadas)
├── scripts/
│ └── seed_db.py # Crea demo.db desde seed.sql
├── examples/
│ └── claude_desktop_config.json # Config de ejemplo para registrar el server
└── tests/
├── test_db_tools.py
└── test_api_tools.py📊 Diagrama
flowchart LR
client["Cliente MCP<br/>Claude Desktop · IDE · agentes"] -->|stdio| server["Servidor MCP · FastMCP"]
server --> db["Tool SQLite<br/>search_customers · get_order_by_id"]
server --> api["Tool clima<br/>get_weather · Open-Meteo"]
server --> res["Resource<br/>esquema de la base"]This server cannot be deployed
Maintenance
Related MCP Connectors
Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.
Bounded tools for rendering, extraction, RAG, enrichment, local discovery and review analysis.
AI-callable tools for API mocking, testing, monitoring, security, and automation.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables querying log data stored in SQLite databases through the Model Context Protocol, allowing natural language interactions with log analysis.-
- FlicenseBqualityDmaintenanceImplements the Model Context Protocol (MCP) to provide AI models with a standardized interface for connecting to external data sources and tools like file systems, databases, or APIs.1153-
- FlicenseNot gradedqualityDmaintenanceImplements the Model Context Protocol to provide LLMs with tools for interacting with Supabase databases, supporting operations like reading, creating, updating, and deleting records with filtering and pagination capabilities.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with SQLite databases by executing read and write queries, listing tables, and inspecting schemas. It provides a secure, local interface for database management and data retrieval through the Model Context Protocol.2MIT