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
- Clone the repository:
git clone <repository-url>
cd phineup-open-mcp-server
- Install dependencies:
pnpm install
- 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 reloadpnpm build
- Build production bundlepnpm start
- Start production serverpnpm lint
- Run ESLintpnpm 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 levelslogs/error.log
- Error level only
Log Levels
error
- Error messageswarn
- Warning messagesinfo
- Informational messagesdebug
- 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
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
š License
ISC License
š Support
For issues and questions, please open an issue in the repository.