MCP API Server
Built with TypeScript providing complete type definitions for API interactions and data validation
Uses Zod for schema validation and type safety when processing API requests and responses
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 API Server what's the weather in Tokyo tomorrow?"
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 API Server
Servidor MCP (Model Context Protocol) con arquitectura modular que permite conectarse a APIs externas.
Estructura del Proyecto
src/
├── config/ # Configuración
│ ├── api.ts # Configuración de API
│ └── env.ts # Variables de entorno
├── services/ # Servicios de negocio
│ ├── httpClient.ts # Cliente HTTP base
│ ├── userService.ts # Servicio de usuarios
│ ├── weatherService.ts # Servicio de clima
│ └── companyService.ts # Servicio de empresas
├── tools/ # Herramientas MCP
│ ├── weatherTool.ts # Herramienta de clima
│ ├── userCreateTool.ts # Crear usuarios
│ ├── userListTool.ts # Listar usuarios
│ ├── companyCreateTool.ts # Crear empresas
│ └── companyListTool.ts # Listar empresas
├── types/ # Tipos TypeScript
│ ├── api.ts # Tipos base de API
│ └── company.ts # Tipos de empresas
└── main.ts # Punto de entradaRelated MCP server: Weather-server MCP Server
Características
✅ Arquitectura modular y escalable
✅ Cliente HTTP reutilizable
✅ Validación con Zod
✅ Tipos TypeScript completos
✅ Manejo de errores robusto
✅ Configuración por variables de entorno
Herramientas Disponibles
Clima
obtener-clima: Obtiene información del clima
Usuarios
crear-usuario: Crea un nuevo usuariolistar-usuarios: Lista todos los usuarios
Empresas (API Externa)
crear-empresa: Crea una nueva empresa vía APITamaños permitidos:
small,medium,large
listar-empresas: Lista empresas desde la API
Scripts Disponibles
# Construir el proyecto
npm run build
# Ejecutar en modo desarrollo
npm run dev
# Ejecutar el servidor
npm start
# Abrir inspector MCP
npm run inspectorVariables de Entorno
API_BASE_URL=https://api.ejemplo.com # URL base de la API
API_TIMEOUT=30000 # Timeout en milisegundos
NODE_ENV=development # Entorno de ejecuciónUso con Inspector MCP
Ejecutar el inspector:
npm run inspectorEl servidor se iniciará en modo debug
Se abrirá automáticamente el navegador con la interfaz
Agregar Nuevos Servicios
Para agregar un nuevo servicio (ej: productos):
Crear tipos en
src/types/product.tsCrear servicio en
src/services/productService.tsCrear herramientas en
src/tools/productCreateTool.ts, etc.Registrar herramientas en
src/main.tsActualizar configuración si es necesario
Estructura de API Externa
El servidor está configurado para trabajar con APIs que sigan este formato:
GET Response
{
"data": [...],
"links": {
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
},
"meta": {
"current_page": 0,
"from": 0,
"last_page": 0,
"per_page": 0,
"to": 0,
"total": 0
}
}POST Request
{
"field1": "value1",
"field2": "value2"
}Available Tools
5 toolscrear-empresaC
Crea una nueva empresa con todos los datos requeridos
Inputs: name (required), email (required), phone (required), address (required), +3 more.
crear-usuarioB
Crea un nuevo usuario con nombre, apellido y DNI
Inputs: nombre (required), apellido (required), dni (required).
listar-empresasB
Lista todas las empresas registradas en la API
Inputs: no named parameters.
listar-usuariosB
Lista todos los usuarios registrados en el sistema
Inputs: no named parameters.
obtener-climaC
Herramienta para obtener clima
Inputs: city (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
The tools are mostly distinct, with clear separation between company and user operations. However, 'obtener-clima' (get weather) is an outlier that could cause confusion about the server's primary domain, as it doesn't relate to the company/user management focus of the other tools.
Four of the five tools follow a consistent Spanish verb_noun pattern (crear-empresa, crear-usuario, listar-empresas, listar-usuarios). 'obtener-clima' also follows this pattern but uses a different verb ('obtener' vs 'crear/listar'), which is a minor deviation that maintains readability.
Five tools is a reasonable count, but the inclusion of 'obtener-clima' makes the scope feel borderline. The core company/user management domain has good coverage with four tools, but the weather tool seems out of place, suggesting either an incomplete or overly broad scope.
For the apparent company/user management domain, there are significant gaps. While create and list operations exist for both entities, there are no update, delete, or get-by-id tools, which are essential for full CRUD coverage. The weather tool adds confusion rather than addressing these gaps.
Maintenance
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
A simple Typescript MCP server built using the official MCP Typescript SDK and smithery/cli. This…
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
Related MCP Servers
- AlicenseBqualityDmaintenanceA TypeScript-based MCP server that provides simulated weather data including current conditions, forecasts, alerts, and location search functionality through both MCP protocol and HTTP API endpoints.528 npm1MIT
- -licenseNot gradedqualityNot gradedmaintenanceA TypeScript-based MCP server that provides weather information through resources and tools, allowing users to access current weather data and forecast predictions for different cities.4 npm-
- AlicenseBqualityDmaintenanceA comprehensive template for building MCP servers with TypeScript, Fastify, and Docker support. Includes tools for calculations and weather data, resources for server information, and prompts for greetings with full development tooling.4MIT
- AlicenseNot gradedqualityDmaintenanceA TypeScript-based MCP server that provides backend API handling and facilitates communication between microservices. Features an organized structure with controllers, routes, and models for easy extensibility and maintenance.1ISC