text2d
text2d — 2D 复古像素艺术纹理 MCP 服务器
一个高性能的模型上下文协议(MCP)服务器,使 AI 助手能够程序化生成、操作并导出用于游戏开发的 2D 复古像素艺术纹理和瓦片集。
功能特性
图像转复古像素艺术: 通过
pixelize_image摄取外部 PNG 文件,自动缩小尺寸、量化为复古调色板,并应用 Bayer 抖动。程序化纹理合成: 确定性地生成
wood、stone(鹅卵石/岩石)、brick、grass、metal(带铆钉的拉丝金属板)和water焦散效果。像素级图元: 通过
set_pixel、set_pixel_batch、draw_shape(直线、矩形、圆形)和flood_fill实现完全控制。复古调色板与量化: 内置真实色彩调色板,包括
PICO-8、DawnBringer 32 (DB32)、Endesga 32、GameBoy、NES Classic和Cyberpunk Neon。像素艺术后处理: Bayer 有序抖动(2x2、4x4、8x8)和 1px 内/外像素完美轮廓。
导出选项: 支持最近邻整数缩放的 PNG 文件、Base64 Data URI、ASCII Unicode 块预览以及 2D JSON 颜色网格。
Related MCP server: Piskel MCP Server
视觉示例与图库
1. 图像像素化(pixelize_image)
将高分辨率写实照片或素材转换为地道的复古像素艺术,并自动进行调色板量化和 Bayer 抖动。
原始输入 | Endesga 32 (32x32) | PICO-8 (32x32) | GameBoy (32x32) |
DawnBringer 32 (48x48) | Cyberpunk Neon (64x64) |
2. 程序化纹理合成(generate_texture)
无需外部素材,即可在数秒内生成无缝、确定性的复古纹理。
木材( | 石材( | 砖块( |
草地( | 金属( | 水( |
MCP 工具矩阵
工具名称 | 描述 | 关键参数 |
| 摄取外部 PNG 并转换为 2D 复古像素艺术 |
|
| 初始化一个新的内存像素画布 |
|
| 合成程序化复古纹理 |
|
| 在 (x, y) 处设置单个像素 |
|
| 批量更新多个坐标 |
|
| 绘制栅格化的直线、矩形或圆形 |
|
| 连续区域泛洪填充 |
|
| 应用 Bayer 有序抖动 |
|
| 绘制 1px 像素完美轮廓 |
|
| 将画布导出为 PNG、Data URI、ASCII 或 JSON |
|
| 列出所有内置复古调色板 | 无 |
| 列出内存中的活动画布 | 无 |
| 检查画布元数据和尺寸 |
|
| 从内存中释放画布 |
|
安装与使用
您可以直接从 GitHub 安装并运行 text2d,而无需发布到 npm:
1. 全局安装(推荐)
直接从 GitHub 仓库全局安装:
npm install -g github:al3duc/text2d-mcp安装后,text2d 命令可在系统范围内使用。
MCP 客户端配置
将 text2d 添加到您的 MCP 客户端配置中(例如 claude_desktop_config.json、mcp_config.json 或 Cursor):
选项 A:使用全局安装(最简单)
{
"mcpServers": {
"text2d": {
"command": "text2d"
}
}
}选项 B:通过 npx 直接执行(无需永久安装)
{
"mcpServers": {
"text2d": {
"command": "npx",
"args": [
"-y",
"github:al3duc/text2d-mcp"
]
}
}
}选项 C:Claude Code CLI 命令
如果使用 Claude Code,可通过单条终端命令注册:
claude mcp add text2d -- npx -y github:al3duc/text2d-mcp选项 D:本地克隆(开发)
git clone https://github.com/al3duc/text2d-mcp.git
cd text2d-mcp
npm install
npm run build{
"mcpServers": {
"text2d": {
"command": "node",
"args": [
"<PATH_TO_TEXT2D_REPOSITORY>/dist/index.js"
]
}
}
}注意:将 <PATH_TO_TEXT2D_REPOSITORY> 替换为您克隆仓库的绝对路径。
构建与测试
# Install dependencies
npm install
# Run unit & integration tests
npm test
# Build TypeScript to dist/
npm run build
# Generate procedural texture samples (wood, stone, brick, grass, metal, water)
npx tsx examples/generate_samples.ts
# Test converting realistic images from examples/input/ to pixel art
npx tsx examples/test_car_pixelize.ts许可证
本项目基于 MIT 许可证授权 - 有关详细信息,请参阅 LICENSE 文件。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceGenerate animated pixel art characters, tilesets, and object directly from your AI coding assistant!38
- AlicenseBqualityBmaintenanceEnables AI assistants to create and manipulate pixel art by providing tools for drawing, layer management, and animation frame control. It supports exporting projects to PNG, GIF, and sprite sheet formats via the Model Context Protocol.2213Apache 2.0
- AlicenseAqualityCmaintenanceEnables AI sprite generation and semantic tools for Aseprite, allowing LLMs to create pixel art, add animations, and manage projects with visual feedback.61GPL 3.0
- AlicenseCqualityBmaintenanceEnables AI assistants to control Aseprite for creating pixel art and animated sprites, with 104 tools covering canvas, drawing, animation, palettes, effects, and more.100MIT
Related MCP Connectors
Generate game assets with AI: sprites, 3D models, animations, sound effects, music, and voices.
Generate authentic pixel art - sprites, animations, and tilesets - from any MCP client
Generate logos, social posts, app screenshots, comic panels & visual-novel assets from prompts.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/al3duc/text2d-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server