{
  "markdown": "# ascii-art-mcp\n\n**ascii-art-mcp** is a **Model Context Protocol (MCP) server** built with **Node.js and TypeScript** that exposes tools for retrieving **ASCII and Unicode art** from a local database.\n\nThe server communicates using **stdio transport**, making it compatible with MCP clients such as:\n\n- Claude Desktop\n- Cursor\n- LM Studio\n- Open WebUI\n- Other MCP-compatible environments\n  \nhttps://theduodecim.github.io/ascii-art-mcp/\n---\n\n# ▶ Run this MCP\n\nJust drop this link into any MCP-compatible AI chat:\n\n```\nhttps://github.com/theduodecim/ascii-art-mcp/tree/main\n```\n\n> \"Run this MCP\"\n\nThe AI will clone the repo, build it, and run it automatically. No setup needed on your end.\n\n---\n\n# 📦 Installation\n\nThe package is available on npm:\n\nhttps://www.npmjs.com/package/ascii-art-mcp\n\nInstall locally:\n\n```bash\nnpm install ascii-art-mcp\n```\n\nOr run directly:\n\n```bash\nnpx ascii-art-mcp\n```\n\n---\n\n# 🌐 MCP Registry\n\nThis server is also published in the official **Model Context Protocol Registry**:\n\nhttps://registry.modelcontextprotocol.io/?q=ascii-art\n\nServer name:\n\n```\nio.github.theduodecim/ascii-art\n```\n\nThis allows MCP-compatible tools to **discover and install it automatically**.\n\n---\n\n# ⚙️ Requirements\n\n- Node.js **20+**\n- npm\n\n---\n\n# 🚀 Running the server manually\n\nDevelopment mode:\n\n```bash\nnpm run dev\n```\n\nBuild + production run:\n\n```bash\nnpm run build\nnpm start\n```\n\nThe server uses **stdio transport** and loads its data from:\n\n```\ndb.json\n```\n\nlocated in the repository root.\n\n---\n\n# 🧰 Available MCP Tools\n\n## get_ascii_art\n\nFinds an art entry by exact **nombre** or by an exact value in **aliases**.\n\n### Input\n\n| Field | Type | Required |\n|------|------|------|\n| query | string | yes |\n\n### Output\n\nReturns the entry's **art** field as plain text.\n\n---\n\n## search_ascii\n\nSearches entries by **categoria**, **tags**, or both.\n\n### Input\n\n| Field | Type | Required |\n|------|------|------|\n| categoria | string | optional |\n| tag | string | optional |\n\nAt least **one filter is required**.\n\n### Output\n\nReturns matching entries' **art fields combined as text output**.\n\n---\n\n## random_ascii\n\nReturns a random entry from the database.\n\n### Input\n\n| Field | Type | Required |\n|------|------|------|\n| tipo | ascii \\| unicode | required |\n\n### Output\n\nReturns the selected entry's **art field as plain text**.\n\n---\n\n## list_categories\n\nLists all unique categories present in the database.\n\n### Input\n\nNone\n\n### Output\n\nCategory names as **newline-separated text**.\n\n---\n\n# 🗂 Data Model\n\nEntries in `db.json` follow the **AsciiArtEntry TypeScript interface**:\n\n```\nsrc/types/asciiArt.ts\n```\n\nEach entry contains metadata such as:\n\n- name\n- category\n- tags\n- aliases\n- art content\n\n---\n\n# 🧪 Testing the MCP Server\n\nA simple integration test was used to verify MCP communication using **JSON-RPC over stdio**.\n\nExample test script (`test.mjs`):\n\n```javascript\nimport { spawn } from \"child_process\";\n\nconst proc = spawn(\"node\", [\"dist/server.js\"], {\n  stdio: [\"pipe\", \"pipe\", \"pipe\"]\n});\n\nproc.stderr.on(\"data\", (d) => {\n  console.log(\"LOG:\", d.toString());\n});\n\nproc.stdout.on(\"data\", (d) => {\n  console.log(\"SERVER:\", d.toString());\n});\n\nfunction send(msg) {\n  const json = JSON.stringify(msg);\n  const payload = `Content-Length: ${Buffer.byteLength(json)}\\r\\n\\r\\n${json}\\r\\n`;\n\n  console.log(\"\\nSENDING:\\n\", json, \"\\n\");\n\n  proc.stdin.write(payload);\n}\n\nsetTimeout(() => {\n  send({\n    jsonrpc: \"2.0\",\n    id: 1,\n    method: \"initialize\",\n    params: {\n      protocolVersion: \"2024-11-05\",\n      capabilities: {},\n      clientInfo: {\n        name: \"tester\",\n        version: \"1.0\"\n      }\n    }\n  });\n}, 500);\n\nsetTimeout(() => {\n  send({\n    jsonrpc: \"2.0\",\n    method: \"initialized\",\n    params: {}\n  });\n}, 1000);\n\nsetTimeout(() => {\n  send({\n    jsonrpc: \"2.0\",\n    id: 2,\n    method: \"tools/list\"\n  });\n}, 1500);\n\nsetTimeout(() => {\n  proc.kill();\n  console.log(\"TEST FINISHED\");\n}, 4000);\n```\n\n---\n\n# 🧠 Architecture\n\n```\nsrc/\n  server.ts\n  tools/\n  types/\n\ndist/\n\ndb.json\n```\n\n- TypeScript MCP server\n- JSON database (`db.json`)\n- Zod validation for tool inputs\n- stdio transport\n\n---\n\n# 🎯 Purpose\n\nThis project demonstrates how to build a simple **MCP tool server** that:\n\n- runs locally\n- requires **no API keys**\n- exposes structured tools\n- serves static data through MCP\n\n---\n\n# 📜 License\n\nMIT\n",
  "bytes": 4333,
  "sha": "ff20791901f2dc28aa1173866e696aeb8474b9d0c73713ad399908509f0dc2f3",
  "repo_slug": "theduodecim/ascii-art-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_theduodecim_ascii_art_09944a8b/readme"
}