Pimp My Ride MCP Server
Enables car customization and racing through natural language by building dream rides with colors, wheels, body kits, spoilers, and driver personas. Supports saving multiple builds with performance scoring and secure authentication.
README
🏎️ Pimp My Ride MCP Server
A Model Context Protocol (MCP) server for car customization and racing. Build and customize your dream ride with natural language through ChatGPT or Claude!
<div align="center"> <img src="https://commons.wikimedia.org/wiki/Special:FilePath/Gumball_3000_-2007(483318373).jpg" alt="Xzibit at Gumball 3000 - 2007" width="400"> <p><em>Photo: <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA 2.0</a>, via Wikimedia Commons</em></p> </div>
Note: This project is an homage to the MTV show Pimp My Ride hosted by Xzibit. Not affiliated with or endorsed by MTV.
Features
- 🎨 Car Customization - Colors, wheels, body kits, spoilers, exhausts, decals, and underglow
- 🏎️ Driver Profiles - Choose your racing persona (RoadRage, SpeedDemon, CoolCalmCollected, etc.)
- 💾 Build Management - Save, load, and manage multiple car builds
- 📊 Performance Scoring - Get calculated performance scores for your builds
- 🔒 Pomerium Authentication - Secure identity-aware access with Pomerium proxy
- 🗄️ Pluggable Storage - SQLite by default, extensible to Redis, PostgreSQL, DynamoDB
Security
⚠️ This MCP server has no built-in authentication or authorization. It reads identity from HTTP headers and trusts them implicitly.
For production deployments, secure this server behind Pomerium, an AI gateway that provides:
- 🔐 Centralized Authentication - OAuth/OIDC integration with your identity provider
- 🛡️ Fine-grained Authorization - Policy-based access control at the tool and method level
- 🔑 Automatic Token Management - Handles OAuth token refresh transparently
- 📊 Observability - Detailed logs of AI agent interactions, tool calls, and parameters
- 🌐 Secure Gateway - Expose internal MCP servers safely to AI agents
Pomerium enables you to define policies like:
- Which users can access which tools
- Rate limiting per user or group
- Audit logging of all tool calls
- Dynamic access control based on user attributes
Architecture with Pomerium
sequenceDiagram
participant User as AI Agent/User
participant Pomerium as Pomerium Gateway
participant MCP as Pimp My Ride MCP Server
participant Storage as SQLite Storage
User->>Pomerium: MCP Request
Pomerium->>Pomerium: Authenticate User (OAuth/OIDC)
Pomerium->>Pomerium: Authorize Tool Access (Policy Check)
Pomerium->>MCP: Forward Request + Identity Headers
Note over Pomerium,MCP: X-Pomerium-Claim-Sub<br/>X-Pomerium-Claim-Email<br/>X-Pomerium-Claim-Name
MCP->>MCP: Extract User Identity
MCP->>Storage: Read/Write Build Data
Storage-->>MCP: Data Response
MCP-->>Pomerium: MCP Response
Pomerium-->>User: MCP Response
Learn more: Pomerium MCP Documentation
Quick Start
Installation
npm install
Configuration
Create a .env file (see .env.example):
# Server Configuration
HOST=0.0.0.0
PORT=3000
NODE_ENV=development
LOG_LEVEL=info
# Storage Configuration
STORAGE_BACKEND=sqlite
SQLITE_DB_PATH=./data/pimp-my-ride.db
Development
npm run dev
Production
npm run build
npm start
Available Tools
Car Customization
getCurrentBuild
Retrieve or create your active car build with all customizations.
updateCarConfig
Update car attributes:
- color - Primary color (red, blue, green, yellow, orange, purple, pink, black, white, silver, gold, cyan, magenta, lime)
- secondaryColor - Secondary/accent color
- wheels - Wheel type (stock, sport, racing, offroad, chrome, neon, spinner)
- bodyKit - Body kit style (stock, sport, racing, drift, luxury, rally, muscle)
- decal - Decal/livery (none, racing_stripes, flames, tribal, camo, carbon_fiber, checkered, sponsor, custom)
- spoiler - Spoiler type (none, stock, sport, racing, gt_wing, ducktail)
- exhaust - Exhaust system (stock, sport, racing, dual, quad, side_exit)
- underglow - Underglow lighting (none, red, blue, green, purple, rainbow, white)
- performance - Performance stats (power, grip, aero, weight: 0-100)
updateDriverProfile
Set driver persona and nickname:
- persona - Driver personality: CoolCalmCollected, RoadRage, SpeedDemon, Cautious, ShowOff, Tactical, Wildcard
- nickname - Driver nickname (1-50 characters)
getCustomizationOptions
Get all available customization options for car parts and driver personas.
getPersonaInfo
Get detailed information about driver personas including racing style, strengths, and weaknesses.
Build Management
saveBuild
Save the current car build under a specific name.
loadBuild
Load a saved car build and make it active.
listBuilds
List all saved car builds with pagination support.
deleteBuild
Delete a saved car build (cannot delete active build).
getBuildDetails
Get detailed information about a build including calculated performance score.
Architecture
Storage Layer
The KV storage abstraction provides:
- Namespaces - Logical data isolation
- TTL Expiration - Automatic cleanup of expired entries
- CAS Versioning - Compare-and-Set for concurrent updates
- Pagination - Cursor-based pagination for large datasets
Default implementation uses SQLite with WAL mode for better concurrency.
Authentication
Pomerium authentication resolves user identity from HTTP headers:
X-Pomerium-Claim-Sub- User IDX-Pomerium-Claim-Email- Email addressX-Pomerium-Claim-Name- Display nameX-Pomerium-JWT-Assertion- JWT token (fallback)
In development mode without Pomerium, the server generates anonymous session-based user IDs.
Data Model
Build Structure:
{
id: string,
name?: string,
car: {
color, secondaryColor, wheels, bodyKit,
decal, spoiler, exhaust, underglow,
performance: { power, grip, aero, weight }
},
driver: {
persona, nickname?
},
createdAt: number,
updatedAt: number
}
API Endpoints
MCP Protocol
POST /mcp- MCP tool callsGET /mcp- Server info
Health Check
GET /health- Storage health status
Environment Variables
| Variable | Description | Default |
|---|---|---|
HOST |
Server host/interface to bind | 0.0.0.0 |
PORT |
Server port | 3000 |
NODE_ENV |
Environment (development/production/test) | development |
LOG_LEVEL |
Logging level (error/warn/info/debug) | info |
STORAGE_BACKEND |
Storage type (sqlite/redis/postgres/dynamodb) | sqlite |
SQLITE_DB_PATH |
SQLite database file path | ./data/pimp-my-ride.db |
SQLITE_VERBOSE |
Enable SQL query logging | false |
Development
Scripts
npm run dev # Development with watch mode
npm run build # Build for production
npm start # Start production server
npm run lint # Check code quality
npm run lint:fix # Fix linting issues
npm run format # Format code with Prettier
npm test # Run tests
Project Structure
src/
├── index.ts # Main server entry point
├── config.ts # Environment configuration
├── logger.ts # Structured logging
├── auth/
│ └── pomerium.ts # Pomerium authentication
├── domain/
│ └── models.ts # Car and driver models
├── storage/
│ ├── kv.ts # KV storage interface
│ ├── sqlite.ts # SQLite implementation
│ ├── factory.ts # Storage factory
│ └── index.ts # Exports
├── tools/
│ └── builds.ts # Build management tools
└── lib/
├── utils.ts # MCP response helpers
└── errors.ts # Error formatting
Deployment
Docker
Available on Docker Hub: nickytonline/pimp-my-ride-mcp
# Pull from Docker Hub
docker pull nickytonline/pimp-my-ride-mcp
# Or build locally
docker build -t pimp-my-ride-mcp .
# Run
docker run -p 3000:3000 -v ./data:/app/data pimp-my-ride-mcp
With Pomerium (Recommended for Production)
Deploy behind Pomerium for secure, policy-based access control:
# pomerium-config.yaml
routes:
- from: https://pimp-my-ride.example.com
to: http://localhost:3000
policy:
- allow:
and:
- email:
is: user@example.com
# Optional: Fine-grained tool access control
mcp_allow_tools:
- getCurrentBuild
- updateCarConfig
- updateDriverProfile
See Pomerium MCP docs for advanced configuration including:
- Tool-level authorization
- User/group-based access control
- Rate limiting
- OAuth upstream integration
Roadmap
Phase 2 - AI Assistance
- [ ]
randomizeBuild- Generate random themed builds - [ ]
suggestUpgrades- AI-powered upgrade recommendations - [ ]
generateLivery- Color scheme suggestions
Phase 3 - Racing
- [ ]
simulateRace- Race simulation - [ ]
getLeaderboard- Global rankings - [ ] Race results persistence
License
MIT
Documentation
- Product Requirements Document (PRD) - Detailed architecture, data models, and implementation phases
- Repository Guidelines (AGENTS.md) - Development conventions, testing, and contribution guidelines
About Pomeranian Kart
Pomeranian Kart is a racing game that uses this MCP server for car customization. Players interact with the game through natural language, building and customizing their dream cars before racing.
References
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。