Lotería MCP
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., "@Lotería MCPShow me the latest lottery results"
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.
🎟️ MCP Lottery
MCP Server for querying lotteries and results via the Lottery Results API.
It exposes two tools that any compatible MCP client (Claude Desktop, Cursor, etc.) can invoke directly from the chat.
📋 Requirements
Tool | Minimum Version |
Python | 3.10+ |
latest |
Related MCP server: Marvel MCP
⚙️ Installation
1. Clone the repository
git clone https://github.com/parrotsoft/loteria-mcp
cd loteria2. Create virtual environment and install dependencies with uv
uv syncThis will automatically create the .venv environment and install all dependencies declared in pyproject.toml.
🚀 Usage with Claude Desktop
Add the following configuration to the Claude Desktop file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"loteria": {
"command": "uv",
"args": [
"--directory",
"/ruta/absoluta/al/proyecto/loteria",
"run",
"loteria.py"
]
}
}
}Note: Replace
/absolute/path/to/project/loteriawith the actual path of the project on your machine.
Restart Claude Desktop and the server will be available.
🛠️ Available Tools
get_lotteries
Returns the complete list of lotteries available in the API.
No parameters.
Example response:
{
"data": [
{ "id": 1, "name": "Lotería Nacional", "country": "MX" },
{ "id": 2, "name": "Melate", "country": "MX" }
]
}get_resultados
Returns lottery results for a specific date.
Parameter | Type | Description |
|
| Date in |
Example response:
{
"data": [
{ "lottery": "Lotería Nacional", "result": "1234", "date": "2026-04-24" }
]
}🧪 Run in development mode
To test the server directly from the terminal:
uv run mcp dev loteria.pyThis opens the MCP Inspector in the browser, where you can call the tools interactively.
📦 Dependencies
Package | Description |
| Async HTTP client for API calls |
| Model Context Protocol framework |
📁 Project structure
loteria/
├── loteria.py # Servidor MCP con las herramientas expuestas
├── main.py # Punto de entrada alternativo
├── pyproject.toml # Configuración del proyecto y dependencias
├── uv.lock # Lock file de dependencias (uv)
├── .gitignore
└── README.md📄 License
MIT
Available Tools
2 toolsget_lotteriesA
Obtiene el listado de todas las loterías disponibles.
Consulta el endpoint `/lotteries` de la API de resultados de loterías
y retorna la información de cada lotería registrada (nombre, país, etc.).
Returns:
dict[str, Any] | None: Diccionario con la lista de loterías disponibles,
o None si ocurre un error de red o la API no responde.
Example:
>>> await get_lotteries()
{"data": [{"id": 1, "name": "Lotería Nacional", ...}, ...]}
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It explicitly states the tool returns a dict or None on network error, and that it queries an API. It does not mention auth or rate limits, but for a read-only list tool, this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise with three parts: purpose, endpoint, and return type with example. Each sentence adds value without redundancy, making it well-structured and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity, no parameters, and existence of an output schema, the description fully suffices. It explains the return structure and includes an example, meeting completeness requirements.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no parameters, and schema coverage is 100%. Per the guidelines, a baseline of 4 is assigned for zero parameters, and the description adds no further parameter info, which is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it obtains the list of all available lotteries by querying the /lotteries endpoint, providing specific verb and resource. The sibling tool 'get_resultados' is for results, so this tool is distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide explicit guidance on when to use this tool versus alternatives, nor does it mention prerequisites or exclusions. Usage is implied by the tool's purpose but not articulated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_resultadosA
Obtiene los resultados de loterías para una fecha específica.
Consulta el endpoint `/results/{date}` de la API cuando se proporciona
una fecha, o `/results` para obtener los resultados más recientes.
Args:
date (str): Fecha en formato `YYYY-MM-DD` para filtrar los resultados.
Si se pasa una cadena vacía, retorna los resultados más recientes.
Returns:
dict[str, Any] | None: Diccionario con los resultados de loterías
para la fecha indicada, o None si ocurre un error de red o la API
no responde.
Example:
>>> await get_resultados("2026-04-24")
{"data": [{"lottery": "Lotería Nacional", "result": "1234", ...}]}
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully carries the burden. It explains that it queries an API endpoint, returns a dict or None on network error, and includes an example. This is adequate disclosure of behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is structured in sections (Args, Returns, Example) and front-loaded. It is slightly verbose but still efficient for the information provided.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (1 param, output schema present), the description covers purpose, parameter semantics, return type, and error cases. It does not mention the sibling tool, but completeness is acceptable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description contains an extensive 'Args' section explaining the single parameter 'date'—format, behavior when empty, and example. It adds significant meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool obtains lottery results for a specific date ('Obtiene los resultados de loterías para una fecha específica'). It distinguishes from the sibling tool 'get_lotteries' which likely lists lotteries, but does not explicitly contrast them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool instead of the sibling 'get_lotteries'. The description provides parameter usage (empty string for most recent) but not tool selection context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
get_lotteries - First observed
get_resultados
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one lists all available lotteries, the other retrieves results for a specific date. There is no risk of confusion.
Both tools follow a consistent 'get_<resource>' pattern in snake_case, using the same language (Spanish) throughout.
Two tools is minimal but reasonable for a simple read-only lottery information server. It borders on feeling thin but does not warrant a lower score.
The server covers listing lotteries and fetching results by date, but lacks features like filtering by lottery or retrieving historical results beyond a single date.
Maintenance
Related MCP Connectors
MCP server for Google search results via SERP API
Public MCP server for summaries, DNS lookup, catalog, replies, and JSON checks.
The official MCP Server for the Mux API
Related MCP Servers
- -licenseNot gradedqualityAmaintenanceMCP Server for the Google Maps API.11,868 npm90,196MIT
- AlicenseBqualityFmaintenanceMCP Server for the Marvel Developer API, enabling interaction with characters and comics data.752 npm14MIT
- FlicenseAqualityDmaintenanceMCP server for the Concept2 Logbook API, enabling user profile management, workout result operations, and challenge queries.14-
- FlicenseNot gradedqualityDmaintenanceA simple MCP server to call RMV APIs for nearby stations and departure boards.-