ascii-art-mcp
ascii-art-mcp
ascii-art-mcp 是一个使用 Node.js 和 TypeScript 构建的 模型上下文协议(MCP)服务器,提供从本地数据库检索 ASCII 和 Unicode 艺术 的工具。
该服务器使用 stdio 传输 进行通信,兼容以下 MCP 客户端:
Claude Desktop
Cursor
LM Studio
Open WebUI
其他兼容 MCP 的环境
https://theduodecim.github.io/ascii-art-mcp/
▶ 运行此 MCP
只需将此链接放入任何兼容 MCP 的 AI 聊天中:
https://github.com/theduodecim/ascii-art-mcp/tree/main“运行此 MCP”
AI 将自动克隆仓库、构建并运行它。您无需进行任何设置。
📦 安装
该包可在 npm 上获取:
https://www.npmjs.com/package/ascii-art-mcp
本地安装:
npm install ascii-art-mcp或直接运行:
npx ascii-art-mcp🌐 MCP 注册表
该服务器也已发布在官方的 模型上下文协议注册表 中:
https://registry.modelcontextprotocol.io/?q=ascii-art
服务器名称:
io.github.theduodecim/ascii-art这使得兼容 MCP 的工具能够自动发现并安装它。
⚙️ 要求
Node.js 20+
npm
🚀 手动运行服务器
开发模式:
npm run dev构建 + 生产运行:
npm run build
npm start服务器使用 stdio 传输,并从以下位置加载数据:
db.json位于仓库根目录。
🧰 可用的 MCP 工具
Related MCP server: MusicBrainz MCP Server
get_ascii_art
通过精确的 名称 或 别名 中的精确值查找艺术条目。
输入
字段 | 类型 | 必填 |
query | string | 是 |
输出
以纯文本形式返回条目的 art 字段。
search_ascii
按 类别、标签 或两者搜索条目。
输入
字段 | 类型 | 必填 |
categoria | string | 可选 |
tag | string | 可选 |
至少需要一个过滤器。
输出
以文本输出形式返回匹配条目的 art 字段组合。
random_ascii
从数据库返回一个随机条目。
输入
字段 | 类型 | 必填 |
tipo | ascii | unicode | 必填 |
输出
以纯文本形式返回所选条目的 art 字段。
list_categories
列出数据库中存在的所有唯一类别。
输入
无
输出
以换行符分隔的文本形式返回类别名称。
🗂 数据模型
db.json 中的条目遵循 AsciiArtEntry TypeScript 接口:
src/types/asciiArt.ts每个条目包含以下元数据:
名称
类别
标签
别名
艺术内容
🧪 测试 MCP 服务器
使用简单的集成测试来验证通过 stdio 上的 JSON-RPC 进行的 MCP 通信。
示例测试脚本(test.mjs):
import { spawn } from "child_process";
const proc = spawn("node", ["dist/server.js"], {
stdio: ["pipe", "pipe", "pipe"]
});
proc.stderr.on("data", (d) => {
console.log("LOG:", d.toString());
});
proc.stdout.on("data", (d) => {
console.log("SERVER:", d.toString());
});
function send(msg) {
const json = JSON.stringify(msg);
const payload = `Content-Length: ${Buffer.byteLength(json)}\r\n\r\n${json}\r\n`;
console.log("\nSENDING:\n", json, "\n");
proc.stdin.write(payload);
}
setTimeout(() => {
send({
jsonrpc: "2.0",
id: 1,
method: "initialize",
params: {
protocolVersion: "2024-11-05",
capabilities: {},
clientInfo: {
name: "tester",
version: "1.0"
}
}
});
}, 500);
setTimeout(() => {
send({
jsonrpc: "2.0",
method: "initialized",
params: {}
});
}, 1000);
setTimeout(() => {
send({
jsonrpc: "2.0",
id: 2,
method: "tools/list"
});
}, 1500);
setTimeout(() => {
proc.kill();
console.log("TEST FINISHED");
}, 4000);🧠 架构
src/
server.ts
tools/
types/
dist/
db.jsonTypeScript MCP 服务器
JSON 数据库(
db.json)用于工具输入的 Zod 验证
stdio 传输
🎯 目的
本项目演示了如何构建一个简单的 MCP 工具服务器,它:
在本地运行
无需 API 密钥
提供结构化工具
通过 MCP 提供静态数据
📜 许可证
MIT
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
- AlicenseNot gradedqualityAmaintenanceAscii Art AI - MCP server providing AI-powered tools and automation by MEOK AI Labs11MIT
- AlicenseNot gradedqualityCmaintenanceA comprehensive MCP server for querying the MusicBrainz database, providing tools to search for artists, releases, recordings, and browse music metadata.4MIT
- FlicenseNot gradedqualityFmaintenanceAn MCP server that enables AI agents to create beautiful ASCII diagrams using Unicode box-drawing characters, with support for stateful canvas operations, multiple shape types, and style customization.2
- AlicenseNot gradedqualityBmaintenanceA Python MCP server for searching, downloading, extracting, inspecting, and previewing game assets from multiple public sources.MIT
Related MCP Connectors
MCP server for accessing curated awesome list documentation
MCP server exposing the AceDataCloud Fish Audio API (text-to-speech with voice conditioning)
An MCP server for deep research or task groups
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/theduodecim/ascii-art-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server