Cloud MCP - Personal MCP Server
A comprehensive personal MCP (Model Context Protocol) server built with Bun and TypeScript, designed for developers, DevOps engineers, and families.
Features
🚀 Programming Tools
- Code Snippet Management: Save, search, list, and delete code snippets with tags and categories
- Project Templates: Quickly generate Vite + Vue3 + TypeScript projects (frontend or fullstack)
- Technical Documentation: Quick access to TypeScript, Vue3, and Bun documentation
- Code Review: Get code review suggestions and optimization tips
🔧 DevOps Tools
- NAS Management: List, upload, download, and search files on your NAS
- Server Monitoring: Check cloud server status (CPU, memory, disk) and view logs
- Router Management: Monitor soft router status, traffic, and connected devices
👨👩👦 Family Tools
- Math Resources: Search and save math teaching resources, generate problems by grade
- Baby Milestones: Record and track baby milestones and set reminders
⚽ Hobby Tools
- Football Information: Get match schedules, team info, and league standings
- Game Information: Search game info, find deals, and manage wishlist
📝 Common Tools
- Notes Management: Create, search, list, and delete personal notes
- Task Management: Add, list, and complete tasks
Installation
- Clone or navigate to the project directory:
cd cloud-mcp
- Install dependencies:
bun install
- Configure environment variables (optional):
cp .env.example .env
# Edit .env with your configuration
Configuration
Create a .env file in the project root with the following variables (all optional):
# NAS Configuration
NAS_HOST=your-nas-ip
NAS_USERNAME=your-username
NAS_PASSWORD=your-password
NAS_PROTOCOL=smb # smb, ftp, or sftp
# Cloud Server Configuration
SERVER_HOST=your-server-ip
SERVER_USERNAME=your-username
SERVER_PORT=22
SERVER_KEY_PATH=/path/to/ssh/key
# Soft Router Configuration
ROUTER_HOST=your-router-ip
ROUTER_USERNAME=admin
ROUTER_PASSWORD=your-password
# Email Configuration (SMTP)
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASSWORD=your-app-password
EMAIL_FROM=Your Name
EMAIL_SECURE=false
# API Keys (optional)
FOOTBALL_API_KEY=your-football-api-key
GAME_API_KEY=your-game-api-key
Usage
Running the Server
bun run dev
Or build and run:
bun run build
bun run start
Connecting to MCP Clients
The server uses stdio transport, so it can be connected to any MCP-compatible client (like Claude Desktop, Cursor, etc.).
Example configuration for Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"cloud-mcp": {
"command": "bun",
"args": ["run", "/path/to/cloud-mcp/src/index.ts"]
}
}
}
Available Tools
Programming
code_snippet_save- Save a code snippetcode_snippet_search- Search code snippetscode_snippet_list- List all code snippetscode_snippet_delete- Delete a code snippetproject_template_create- Create Vite + Vue3 projectproject_template_create_fullstack- Create fullstack projectproject_template_list- List available templatesdocs_typescript- Get TypeScript documentationdocs_vue3- Get Vue3 documentationdocs_bun- Get Bun documentationcode_review- Review codecode_optimize- Get optimization suggestionsgit_status- Get git repository statusgit_add- Stage files for commitgit_commit- Commit staged changesgit_push- Push commits to remotegit_pull- Pull latest changes from remotegit_log- Show commit historygit_branch- List, create, or delete branchesgit_diff- Show changes between commits or working directory
DevOps
nas_list_files- List NAS filesnas_upload_file- Upload file to NASnas_download_file- Download file from NASnas_search_files- Search files on NASserver_status- Get server statusserver_deploy- Deploy applicationserver_logs- View server logsrouter_status- Get router statusrouter_traffic- Get traffic statisticsrouter_devices- List connected devices
Family
math_resource_search- Search math resourcesmath_problem_generate- Generate math problemsmath_resource_save- Save math resourcebaby_milestone_add- Record baby milestonebaby_milestone_list- List milestonesbaby_reminder_set- Set baby reminder
Hobbies
football_matches- Get football matchesfootball_team_info- Get team informationfootball_standings- Get league standingsgame_info- Get game informationgame_deals- Get game dealsgame_wishlist- Manage game wishlist
Common
note_create- Create a notenote_search- Search notesnote_list- List notesnote_delete- Delete a notetask_add- Add a tasktask_list- List taskstask_complete- Complete a taskemail_send- Send email via SMTP (supports text, HTML, and attachments)
Data Storage
All data is stored in PostgreSQL database. The application requires a PostgreSQL database connection.
Database Setup
-
Configure Database Connection
Set the
DATABASE_URLenvironment variable in your.envfile:DATABASE_URL=postgresql://user:password@host:port/database -
Initialize Database Schema
Run the initialization script to create all required tables:
bun run init-dbThis will create the following tables:
code_snippets- Code snippetsnotes- Personal notestasks- Tasksbaby_milestones- Baby milestonesmath_resources- Math resourcesgame_wishlist- Game wishlist
Database Schema
The database schema is defined in src/storage/schema.sql. All tables include appropriate indexes for optimal query performance.
Development
Project Structure
cloud-mcp/
├── src/
│ ├── index.ts # Entry point
│ ├── server.ts # MCP server core
│ ├── tools/ # Tool modules
│ │ ├── programming/ # Programming tools
│ │ ├── devops/ # DevOps tools
│ │ ├── family/ # Family tools
│ │ ├── hobbies/ # Hobby tools
│ │ └── common/ # Common tools
│ ├── storage/ # Storage layer
│ │ ├── config.ts # Configuration
│ │ └── database.ts # Database/storage
│ └── utils/ # Utilities
│ └── logger.ts # Logging
├── data/ # Data files (created at runtime)
├── package.json
├── tsconfig.json
└── README.md
Adding New Tools
- Create a new tool file in the appropriate directory under
src/tools/ - Export a registration function (e.g.,
registerMyTool) - Import and call it in
src/index.ts
Example:
// src/tools/myfeature/myTool.ts
import { mcpServer } from '../../server.js';
export function registerMyTool(): void {
mcpServer.registerTool(
{
name: 'my_tool',
description: 'My tool description',
inputSchema: {
type: 'object',
properties: {
// ...
},
},
},
async (args) => {
// Tool implementation
return {
content: [{ type: 'text', text: 'Result' }],
};
}
);
}
License
MIT
Contributing
This is a personal MCP server, but feel free to fork and customize for your own needs!