phineup-open-mcp-server

Phine-Up/phineup-open-mcp-server

3.2

If you are the rightful owner of phineup-open-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Phineup Open MCP Server is a production-ready server implementing the Model Context Protocol with advanced features for tool management, logging, and error handling.

Tools
3
Resources
0
Prompts
0

Phineup Open MCP Server

Production-ready MCP (Model Context Protocol) server with advanced tooling capabilities, comprehensive logging, and robust error handling.

šŸš€ Features

  • MCP Protocol Support: Full implementation of Model Context Protocol
  • Tool Management: Dynamic tool registration and execution
  • Advanced Logging: Winston-based logging with file and console output
  • Error Handling: Comprehensive error handling and graceful shutdown
  • Type Safety: Full TypeScript support with strict type checking
  • Production Ready: Environment configuration, process management, and monitoring

šŸ“‹ Prerequisites

  • Node.js 18.0.0 or higher
  • pnpm package manager

šŸ› ļø Installation

  1. Clone the repository:
git clone <repository-url>
cd phineup-open-mcp-server
  1. Install dependencies:
pnpm install
  1. Create environment file:
cp .env.example .env
# Edit .env with your configuration

šŸƒā€ā™‚ļø Usage

Development Mode

pnpm dev

Production Mode

pnpm build
pnpm start

Available Scripts

  • pnpm dev - Start development server with hot reload
  • pnpm build - Build production bundle
  • pnpm start - Start production server
  • pnpm lint - Run ESLint
  • pnpm lint:fix - Fix ESLint issues

šŸ› ļø Built-in Tools

1. Echo Tool

  • Name: echo
  • Description: Echoes back the input text
  • Parameters: { text: string }

2. Calculator Tool

  • Name: calculate
  • Description: Performs basic mathematical operations
  • Parameters: { operation: 'add'|'subtract'|'multiply'|'divide', a: number, b: number }

3. System Info Tool

  • Name: system_info
  • Description: Returns system information
  • Parameters: {}

šŸ”§ Adding Custom Tools

import { z } from 'zod';

// Register a new tool
mcpServer.registerTool(
  'custom_tool',
  'Description of your tool',
  z.object({
    // Define your input schema
    param1: z.string().describe('Parameter description'),
    param2: z.number().describe('Another parameter'),
  }),
  async (args) => {
    // Your tool logic here
    return { result: 'success' };
  }
);

šŸ“ Project Structure

phineup-open-mcp-server/
ā”œā”€ā”€ src/
│   └── index.ts          # Main MCP server implementation
ā”œā”€ā”€ dist/                 # Compiled JavaScript output
ā”œā”€ā”€ logs/                 # Log files
ā”œā”€ā”€ package.json          # Dependencies and scripts
ā”œā”€ā”€ tsconfig.json         # TypeScript configuration
└── README.md            # This file

šŸ” Logging

The server uses Winston for comprehensive logging:

  • Console: Colored, formatted logs for development
  • File Logs:
    • logs/combined.log - All log levels
    • logs/error.log - Error level only

Log Levels

  • error - Error messages
  • warn - Warning messages
  • info - Informational messages
  • debug - Debug information

🚨 Error Handling

  • Comprehensive error catching and logging
  • Graceful shutdown on SIGINT/SIGTERM
  • Process exit codes for different error scenarios
  • Tool execution error isolation

šŸ”’ Security Features

  • Input validation using Zod schemas
  • Error message sanitization
  • Rate limiting support (configurable)
  • CORS configuration options

šŸ“Š Monitoring

  • Process uptime tracking
  • Memory usage monitoring
  • Tool execution statistics
  • Health check endpoints

šŸ¤ Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

šŸ“„ License

ISC License

šŸ†˜ Support

For issues and questions, please open an issue in the repository.