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: Ascii Art AI MCP
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
Available Tools
4 toolsget_ascii_artA
Search an ASCII/Unicode art entry by nombre or aliases and return the art text.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the behavioral burden. It reliably conveys a read/search operation and that the art text is returned, but it does not disclose behavior for edge cases such as no match, multiple matches, or case sensitivity. The core behavior is communicated, but not deeply.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that uses an active verb and provides both search scope and result. There is no filler or unnecessary repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one parameter, no nested objects, and a clear text return, the description is largely complete. It states both what is being searched and what is returned. It could mention empty/error behavior, but the simplicity of the tool limits the need.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema only describes 'query' as a string with minLength 1; it gives no semantic meaning. The description compensates by explaining that the query is matched against 'nombre or aliases', which effectively defines the parameter's purpose. It could add more nuance about matching, but it is sufficient for a single-parameter tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'search', the resource 'ASCII/Unicode art entry', and the lookup criteria 'by nombre or aliases'. This makes it distinct from random_ascii and list_categories, though the overlap with sibling search_ascii is not fully clarified.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit guidance on when to use this tool instead of alternatives. The description implies it is for finding an entry by known name/alias, but it does not mention exclusions or direct the agent to search_ascii for broader text search.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_categoriesA
List all unique categories available in the database.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, and the description does not explicitly state that the operation is read-only or safe. While 'list' implies no side effects, the absence of any safety or side-effect disclosure leaves some ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no extraneous words. It is appropriately sized and front-loaded with the core action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple listing operation with no parameters and no output schema, the description fully explains what the tool does. It is complete for the tool's scope, and no additional information appears necessary.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so there are no parameter details to convey. The description does not need to add anything beyond the schema, and nothing is missing.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool lists all unique categories from the database, leaving no ambiguity about its function. The verb 'list' and the object 'all unique categories' provide clear intent.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not mention when to use this tool versus alternatives like get_ascii_art or search_ascii. It lacks explicit context for choosing this tool over others, though the purpose alone might imply use when category listing is needed.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
random_asciiA
Return a random ASCII/Unicode art entry, optionally filtered by tipo.
| Name | Required | Description | Default |
|---|---|---|---|
| tipo | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full behavioral disclosure burden. It only states what it returns, not any side effects (though likely read-only), determinism, or failure modes. It doesn't mention if the result could be empty, or whether the filter restricts the random pool. Minimal behavioral insight beyond the immediate action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence. It packs the core information (random + optional filter) without wasted words. Perfectly sized for a simple tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (1 optional param, no output schema, no annotations), the description is minimally complete. It states what it returns and how to filter. However, it lacks context on when to use this vs siblings, and does not indicate if the selection is truly uniform or if there are any edge cases (e.g., empty category). For a straightforward read-only tool, it's adequate but not thorough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema defines 'tipo' as an enum (ascii/unicode), so baseline is 3 due to schema coverage. The description adds the meaning that it acts as a filter ('optionally filtered by tipo'), which is useful. However, it doesn't elaborate beyond that—no format details or examples, so it neither fully compensates for the 0% schema description coverage nor adds substantial extra meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action (return a random art entry) and identifies the resource (ASCII/Unicode art) with an optional filter. It inherently distinguishes from siblings like get_ascii_art (specific retrieval) and search_ascii (filtered search) by emphasizing randomness. The verb 'Return' is explicit and the scope is well-defined.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for obtaining a random art entry, but does not explicitly compare to alternatives or state when not to use it. There is no mention of when to prefer this over search_ascii or get_ascii_art. It provides a clear context (random selection) but no exclusions or contrast with sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_asciiA
Search entries by categoria or tags and return matching art texts.
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | ||
| categoria | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the transparency burden. It states the action ('search') and outcome ('return matching art texts'), which implies a read-only operation. It does not explicitly mention side effects, but the nature of search suggests no state changes, so it is reasonably transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no superfluous information. It directly communicates the tool's purpose without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple context and the existence of sibling tools, the description adequately covers the essential information. It does not explain return format or edge cases, but the lack of an output schema makes that less critical. Overall, it provides enough context for a basic understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides no descriptions, but the description mentions 'categoria or tags', giving some meaning to the parameters. However, it does not clarify whether both are optional, how they combine, or acceptable formats, so it adds partial value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool searches entries by categoria or tags and returns matching art texts. It uses a specific verb ('search') and resource ('entries'), and it is distinct from sibling tools like get_ascii_art, random_ascii, and list_categories.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for searching, but it does not explicitly contrast with alternatives or explain when this tool should be preferred over others. It lacks guidance on context, such as whether to use it when looking for specific art texts.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.1- First observed
get_ascii_art - First observed
list_categories - First observed
random_ascii - First observed
search_ascii
TDQS
Scored across 4 tools
get_ascii_art and search_ascii both return matching art texts, which could cause some confusion, but they are distinguished by query type (name/aliases vs. category/tags). random_ascii and list_categories are clearly distinct.
Three tools follow a clear verb_noun pattern (get_ascii_art, search_ascii, list_categories), and random_ascii is still readable and consistent in snake_case despite lacking a typical verb prefix.
With only 4 tools, the server is tightly scoped to ASCII art retrieval and discovery. Every tool serves a useful purpose and the count feels appropriate for the niche domain.
The server covers the core read-only workflows: finding by name, browsing by category/tag, getting random art, and listing available categories. There are no obvious missing operations for an ASCII art lookup service.
Maintenance
Related MCP Connectors
MCP server for accessing curated awesome list documentation
An MCP server that provides tools to discover and retrieve podcast episodes transcripts.
MCP registry & directory: search, find & install 31k+ MCP servers & tools. Catalog and marketplace.
Related MCP Servers
- MIT
- AlicenseNot gradedqualityBmaintenanceAscii Art AI - MCP server providing AI-powered tools and automation by MEOK AI Labs7 npm46 PyPIMIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server for querying the MusicBrainz database, providing tools to search for artists, releases, recordings, and browse music metadata.4MIT
- FlicenseNot gradedqualityDmaintenanceAn 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-