Fibonacci MCP Server
Uses Express as the web framework for serving the MCP server endpoints, including the main MCP endpoint, health checks, and the home page.
Mentioned as part of the deployment workflow for pushing code to repositories before deploying to Render.
Supported as a source code repository option for deploying the MCP server to Render.
Supported as a source code repository option for deploying the MCP server to Render.
Built on Node.js (version 18.0.0 or higher required) as the server runtime environment for the MCP functionality.
Uses npm for package management, dependency installation, and running server commands.
Designed to comply with OpenAI's MCP specifications for secure model context protocols.
Provides deployment configuration and instructions for hosting the MCP server on Render, with both automatic deployment via render.yaml and manual deployment options.
Employs Zod schemas for comprehensive input validation of user requests to the MCP server.
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., "@Fibonacci MCP Servercalculate the 15th Fibonacci number"
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.
Fibonacci MCP Server
A secure Model Context Protocol (MCP) server that provides tools for calculating Fibonacci numbers. This server is designed to meet OpenAI's MCP specifications and includes comprehensive security measures for production deployment.
Features
Fibonacci Calculator: Calculate the nth Fibonacci number with input validation
BMI Calculator: Calculate BMI from weight and height with realistic bounds
Code Review Prompt: Generate prompts for code review with size limits
Web Interface: Beautiful home page explaining the server capabilities
Session Management: Stateful MCP server with automatic session cleanup
Security Features: Rate limiting, CORS, input validation, and error handling
Production Ready: Health checks, logging, and environment-specific configurations
Related MCP server: MCP Secure Local Server
Security & Compliance Features
🔒 Security Measures
Rate Limiting: 1000 requests per 15-minute window per IP
Input Validation: Comprehensive validation using Zod schemas
Request Size Limits: 10MB limit on request payloads
CORS Configuration: Proper CORS headers for MCP client compatibility
Session Timeout: Automatic cleanup of sessions older than 1 hour
Error Handling: Proper error responses following MCP protocol standards
🛡️ Production Readiness
Health Check Endpoint:
/healthfor monitoring and load balancersStructured Logging: Comprehensive error logging and monitoring
Environment Detection: Automatic configuration for production vs development
Memory Management: Automatic cleanup of rate limit and session data
Graceful Error Handling: Proper HTTP status codes and JSON-RPC error responses
📋 MCP Protocol Compliance
Proper Error Codes: JSON-RPC 2.0 compliant error responses
Server Metadata: Complete server information and capabilities
Session Management: Proper MCP session lifecycle management
Resource Validation: Input validation for dynamic resources
Local Development
Prerequisites
Node.js 18.0.0 or higher
npm
Installation
Clone the repository:
git clone <your-repo-url>
cd fibonacci-mcpInstall dependencies:
npm installStart the server:
npm startThe server will be available at:
Home page: http://localhost:7171/
MCP endpoint: http://localhost:7171/mcp
Health check: http://localhost:7171/health
Deployment on Render
Option 1: Using render.yaml (Recommended)
Push your code to a Git repository (GitHub, GitLab, etc.)
Connect your repository to Render
Render will automatically detect the
render.yamlfile and deploy your service
Option 2: Manual Deployment
Create a new Web Service on Render
Connect your Git repository
Configure the service:
Environment: Node
Build Command:
npm installStart Command:
npm startEnvironment Variables:
NODE_ENV:production
Environment Variables
PORT: Port number (automatically set by Render)NODE_ENV: Set toproductionfor production deployments
MCP Tools
fibonacci
Calculate the nth Fibonacci number with input validation.
Parameters:
n(number): The position in the Fibonacci sequence (0-indexed, max 1000)
Example:
{
"method": "tools/call",
"params": {
"name": "fibonacci",
"arguments": {
"n": 10
}
}
}Response:
{
"content": [
{
"type": "text",
"text": "The 10th Fibonacci number is: 55"
}
]
}calculate-bmi
Calculate BMI from weight and height with realistic bounds.
Parameters:
weightKg(number): Weight in kilograms (0-1000)heightM(number): Height in meters (0.1-3.0)
review-code
Generate a prompt for code review with size limits.
Parameters:
code(string): The code to review (max 10,000 characters)
MCP Resources
config://app: Static application configurationusers://{userId}/profile: Dynamic user profile data (with input validation)
API Endpoints
GET /: Home page with server informationGET /health: Health check endpoint for monitoringPOST /mcp: MCP protocol endpointGET /mcp: Server-sent events (SSE) for notificationsDELETE /mcp: Session termination
Security Headers
The server automatically includes the following security headers:
Access-Control-Allow-Origin: *Access-Control-Allow-Methods: GET, POST, DELETE, OPTIONSAccess-Control-Allow-Headers: Content-Type, mcp-session-id, Authorization
Rate Limiting
Limit: 1000 requests per 15-minute window per IP address
Response: HTTP 429 with JSON-RPC error when limit exceeded
Storage: In-memory with automatic cleanup
Error Handling
The server returns proper JSON-RPC 2.0 error responses:
{
"jsonrpc": "2.0",
"error": {
"code": -32000,
"message": "Bad Request: No valid session ID provided"
},
"id": null
}Common error codes:
-32000: Bad Request-32029: Rate limit exceeded-32601: Method not found-32603: Internal server error
Monitoring & Health Checks
Health Check Response
{
"status": "healthy",
"timestamp": "2024-01-15T10:30:00.000Z",
"uptime": 3600,
"sessions": 5
}Logging
The server logs:
Session creation and cleanup
Rate limit violations
Error conditions
Server startup information
Technical Details
Server Name: fibonacci-mcp-server
Version: 1.0.0
Protocol: Model Context Protocol (MCP)
Transport: HTTP/Express with session management
Node.js Version: >=18.0.0
Security: Rate limiting, CORS, input validation
Compliance: JSON-RPC 2.0, MCP protocol standards
OpenAI MCP Compliance
This server is designed to meet OpenAI's MCP specifications:
✅ Authentication & Security: Rate limiting, input validation, CORS
✅ Error Handling: Proper JSON-RPC error responses
✅ Session Management: Secure session lifecycle
✅ Production Readiness: Health checks, logging, monitoring
✅ Protocol Compliance: MCP and JSON-RPC 2.0 standards
✅ Resource Management: Memory cleanup and timeout handling
License
ISC
This server cannot be deployed
Maintenance
Related MCP Connectors
The OpenZeppelin Stylus Contracts MCP server generates secure smart contracts for the Arbitrum Stylus environment using OpenZeppelin templates, including ERC-20, ERC-721, and ERC-1155 standards. It automatically validates generated code against OpenZeppelin's security and style rules, enforcing best practices for imports, modifiers, naming conventions, and security checks to prevent common vulnerabilities. The server integrates with AI development tools like Cursor, Claude, Gemini, Windsurf, and VS Code to enable AI-assisted, production-ready smart contract development.
The OpenZeppelin Stellar Contracts MCP server generates secure smart contracts for the Stellar blockchain based on OpenZeppelin templates. It integrates with AI assistants to automatically enforce OpenZeppelin's security best practices, style rules, and standards at every prompt, enabling developers to create production-ready Fungible Token, Non-Fungible Token, and Stablecoin contracts through AI-driven workflows.
The Turkish Airlines MCP server enables AI models to securely access live airline data and services, designed for developers and power users to build and test AI-driven travel solutions. It provides 13 specialized tools covering flight information (real-time status, schedules, availability), booking management (PNR details, check-in, baggage allowances), and personalized services (Miles&Smiles profiles, flight history, promotions). The server uses OAuth 2.0 authentication and is deployed on cloud-native infrastructure with enterprise-level security.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Related MCP Servers
- AlicenseCqualityCmaintenanceA Model Context Protocol (MCP) server that provides AI-powered security analysis and safety instruction tools. This server helps protect AI agents by providing security guidelines, content analysis, and cautionary instructions when interacting with various MCPs and external services.68 npm22ISC
- AlicenseBqualityCmaintenanceA security-focused Model Context Protocol server that enables controlled local tool execution through strict network firewalls, filesystem protections, and rate-limiting policies. It features a plugin-based architecture for progressive tool discovery and includes reference implementations for web searching and bug tracking.15MIT
- AlicenseBqualityCmaintenanceA secure Model Context Protocol server that allows AI assistants to execute terminal commands with controlled directory access and command permissions. It features a robust security architecture including whitelisting, session IDs, and categorized command levels to ensure safe system interaction.8MIT
- FlicenseNot gradedqualityCmaintenanceA secure Model Context Protocol server providing HTTP endpoints for AI agent tool execution, including file system operations, shell commands, and LLM-based code generation.1-