A production-ready Model Context Protocol (MCP) server for...
ΒΏQuΓ© hacemos cuando un sistema RAG con modelos pequeΓ±os no alcanza nuestras expectativas? ΒΏAbandonar? ΒΏGastΓ‘r mΓ‘s? ΒΏO buscar alternativas eficientes basadas en agentes? Ven a esta sesiΓ³n donde veremos como resolver con agentes (Llama Stack) sobre Red Hat AI problemas aparentemente sencillos pero que RAG no puede resolver por sΓ mismo.
Partiremos de un caso trivial en principio pero que un RAG no soluciona porque requerirΓa un LLM muy "inteligente" y por tanto caro. Con Red Hat AI veremos como este problema se puede resolver aplicando la mΓ‘xima de divide y venceras. Para ello exploraremos una soluciΓ³n basada en Llama Stack sobre Red Hat AI donde el problema se divide en recuperaciΓ³n de informaciΓ³n relevante (RAG), capacidad de comprender el lenguaje natural (LLM) y por ΓΊltimo capacidad de cΓ‘lculo complejo y acceso a sistemas externos (agentes). Al final de la sesiΓ³n habrΓ©is comprendido la problemΓ‘tica que resuelven los agentes, los protocolos detrΓ‘s del telΓ³n (MCP), cΓ³mo se trabaja en un proyecto de este estilo, la arquitectura de agentes sobre Red Hat AI y como desplegarla de forma eficiente en Red Hat OpenShift.
TODO
- Real-time BON Calculadora Data: Get current bon-calculadora conditions and forecasts
- BON Calculadora Alerts: Receive bon-calculadora alerts for US states
- MCP Compatible: Full Model Context Protocol implementation following the official guide
- Production Ready: Container support with multi-stage builds
- Beyond Claude Desktop: Extended deployment options beyond the basic tutorial
- Developer Friendly: TypeScript with comprehensive tooling
- Multiple Transports: Stdio, SSE, and HTTP support via supergateway
- DXT Package Support: Generate deployment packages for easy Claude Desktop integration
This project starts with the official MCP server quickstart guide and extends it with production-grade features:
- Enterprise Deployment: Containerization with Red Hat UBI images
- Production Builds: Optimized builds with proper dependency management
- DXT Packaging: Simplified deployment packages for Claude Desktop
- Multiple Transports: Beyond stdio to include web interfaces
- CI/CD Ready: GitHub Actions and container registry integration
- Development Tools: Enhanced debugging and testing capabilities
If you're following the official MCP guide, this repository shows you how to take your bon-calculadora server to production.
- Node.js 20+ with npm
- TypeScript 5.x
- Docker/Podman (for containerized deployment)
# Clone the repository
git clone https://github.com/alpha-hack-program/bon-calculadora-mcp-js.git
cd bon-calculadora-mcp-js
# Install dependencies
make install
# Build the project
make build
# Test the server
make test-stdioCreate a deployment package for easy Claude Desktop integration:
# Create a DXT deployment package
make packThis creates a bon-calculadora-mcp.dxt file containing:
- Compiled JavaScript code
- Production dependencies only
- Ready-to-use configuration
- Installation instructions
To install the DXT package:
TODO
TODO
The weather MCP server provides the following tools:
Get weather forecast for a specific location.
{
"name": "get_forecast",
"arguments": {
"latitude": 40.7128,
"longitude": -74.0060
}
}Get weather alerts for a US state.
{
"name": "get_alerts",
"arguments": {
"state": "CA"
}
}# Start the MCP Inspector for interactive testing
make test-inspector
# Or test the stdio transport directly
make test-stdioThe inspector will open a web interface at http://localhost:5173 where you can interact with the server.
# Make the image script executable
chmod +x image.sh
# Build the container image
./image.sh build
# Push to registry
./image.sh push
# Run locally
./image.sh run
# Run from remote registry
./image.sh run-remoteThe container build uses environment variables from .env:
# Container configuration
BASE_TAG="9.6"
BASE_IMAGE="registry.access.redhat.com/ubi9/nodejs-22-minimal"
CACHE_FLAG=""
# Registry settings
ORG=atarazana
REGISTRY=quay.io/${ORG}
# Application
APP_NAME=weather-mcp# Run with Docker/Podman
docker run -it quay.io/atarazana/weather-mcp:latest
# Or with supergateway for web access
docker run -p 3000:3000 -it quay.io/atarazana/weather-mcp:latestweather-mcp-js/
βββ src/
β βββ index.ts # Main server implementation
βββ build/ # Compiled JavaScript output
βββ Containerfile # Container build definition
βββ image.sh # Container management script
βββ tsconfig.json # TypeScript configuration
βββ package.json # Node.js dependencies and scripts
βββ Makefile # Build automation
βββ .env # Environment configuration
# Development
make install # Install dependencies
make build # Build TypeScript
make clean # Clean build artifacts
# Testing
make test-stdio # Test stdio transport
make test-inspector # Test with MCP Inspector
make test-sse # Test SSE transport
# Production
make pack # Create DXT deployment package
make build-prod # Production build only
# Container Management
make docker-build # Build container image
make docker-push # Push to registry
make docker-run # Run container locally
make docker-clean # Clean up containersThe project uses Make for consistent build automation following enterprise practices:
# Quick development cycle
make clean build test-stdio
# Production deployment
make pack
# Container workflow
make docker-build docker-pushNODE_ENV: Set toproductionfor production buildsLOG_LEVEL: Logging level (debug,info,warn,error)
The project uses modern TypeScript with ES modules:
{
"compilerOptions": {
"target": "ES2022",
"module": "Node16",
"moduleResolution": "Node16",
"outDir": "./build",
"rootDir": "./src",
"strict": true
}
}The easiest way to deploy for Claude Desktop:
# Create deployment package
make pack
# This generates weather-mcp.dxt containing:
# - Compiled JavaScript
# - Production dependencies
# - Installation instructionsExtract and configure in Claude Desktop:
tar -xzf weather-mcp.dxt
# Then update claude_desktop_config.json with the extracted pathFor development or custom deployments:
# Production build
make build-prod
# Run directly
node build/index.jsEnterprise container deployment:
# Build and run container
make docker-build
make docker-runBeyond the official MCP guide - serve via HTTP/SSE:
# Install supergateway globally
npm install -g supergateway
# Build and serve with web interface
make build
supergateway --stdio "node build/index.js"This enables web-based interaction and testing beyond Claude Desktop integration.
This server implements the Model Context Protocol specification:
- Initialize: Establishes connection and capabilities
- Tools: Provides weather-related tools
- Tool Calls: Executes weather data requests
All tools use JSON Schema for input validation:
// Forecast tool schema
{
type: "object",
properties: {
latitude: { type: "number", minimum: -90, maximum: 90 },
longitude: { type: "number", minimum: -180, maximum: 180 }
},
required: ["latitude", "longitude"]
}
// Alerts tool schema
{
type: "object",
properties: {
state: { type: "string", minLength: 2, maxLength: 2 }
},
required: ["state"]
}We welcome contributions! This project extends the official MCP quickstart guide with production features.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Build and test:
make clean build test-stdio - Test with the inspector:
make test-inspector - Create a deployment package:
make pack - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow the official MCP guide patterns
- Use TypeScript strict mode
- Follow ESLint configuration
- Add JSDoc comments for public APIs
- Write meaningful commit messages
- Test both stdio and web transports
This project is licensed under the MIT License - see the LICENSE file for details.
- Model Context Protocol for the official specification and quickstart guide
- MCP Server Quickstart - the foundation of this project
- Anthropic for Claude Desktop integration and MCP development
- Alpha Hack Program for supporting production-grade MCP implementations
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Official MCP Guide: MCP Server Quickstart
- MCP Documentation: Model Context Protocol Docs
See CHANGELOG.md for version history and updates.
Built with β€οΈ extending the official MCP guide for production use
From tutorial to production-ready deployment