emoji-mcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # Emoji MCP
2
+
3
+ Search emoji by name or keyword from a bundled catalog. No network, no key.
4
+
5
+ This file is self contained. It reads public data only and never writes to the machine. All output is bounded and honest about what could not be fetched.
6
+
7
+ ## Tools
8
+
9
+
10
+ * `search` Find emoji by keyword.
11
+ * `categories` List categories.
12
+
13
+ ## Usage
14
+
15
+ ```bash
16
+ npm install
17
+ npm run build
18
+ node dist/index.js
19
+ ```
20
+
21
+ The emoji catalog is bundled with the server and searched locally.
package/dist/api.js ADDED
@@ -0,0 +1,66 @@
1
+ const UA = "mrfentmen-emoji-mcp/1.0";
2
+ export class EmojiError extends Error {
3
+ }
4
+ // Compact catalog: keyword groups -> emoji characters.
5
+ const CATALOG = {
6
+ smile: ["๐Ÿ˜€", "๐Ÿ˜", "๐Ÿ˜‚", "๐Ÿคฃ", "๐Ÿ˜Š", "๐Ÿ˜„", "๐Ÿ˜ƒ", "๐Ÿ™‚", "๐Ÿ˜‰", "๐Ÿ˜", "๐Ÿฅฐ", "๐Ÿ˜˜"],
7
+ heart: ["โค๏ธ", "๐Ÿงก", "๐Ÿ’›", "๐Ÿ’š", "๐Ÿ’™", "๐Ÿ’œ", "๐Ÿ–ค", "๐Ÿค", "๐Ÿ’”", "๐Ÿ’–", "๐Ÿ’•", "๐Ÿ’—"],
8
+ sad: ["๐Ÿ˜ข", "๐Ÿ˜ญ", "๐Ÿ˜ž", "๐Ÿ˜”", "๐Ÿ˜Ÿ", "๐Ÿ˜ฉ", "๐Ÿ˜ซ", "๐Ÿฅบ", "๐Ÿ˜ฃ", "๐Ÿ˜–"],
9
+ angry: ["๐Ÿ˜ก", "๐Ÿ˜ ", "๐Ÿคฌ", "๐Ÿ˜ค", "๐Ÿ˜พ"],
10
+ animal: ["๐Ÿถ", "๐Ÿฑ", "๐Ÿญ", "๐Ÿน", "๐Ÿฐ", "๐ŸฆŠ", "๐Ÿป", "๐Ÿผ", "๐Ÿจ", "๐Ÿฏ", "๐Ÿฆ", "๐Ÿฎ", "๐Ÿท", "๐Ÿธ", "๐Ÿต", "๐Ÿ”", "๐Ÿง", "๐Ÿฆ„", "๐Ÿ", "๐Ÿฆ‹"],
11
+ dog: ["๐Ÿถ", "๐Ÿฆฎ", "๐Ÿ•", "๐Ÿฉ"],
12
+ cat: ["๐Ÿฑ", "๐Ÿˆ", "๐Ÿˆโ€โฌ›"],
13
+ food: ["๐ŸŽ", "๐Ÿ", "๐ŸŠ", "๐Ÿ‹", "๐ŸŒ", "๐Ÿ‰", "๐Ÿ‡", "๐Ÿ“", "๐Ÿ’", "๐Ÿ‘", "๐Ÿฅญ", "๐Ÿ", "๐Ÿฅฅ", "๐Ÿฅ", "๐Ÿ…", "๐Ÿฅ‘", "๐Ÿž", "๐Ÿง€", "๐Ÿ•", "๐Ÿ”", "๐ŸŸ", "๐ŸŒญ", "๐Ÿฟ", "๐Ÿฉ", "๐Ÿช", "๐ŸŽ‚", "๐Ÿฐ", "๐Ÿซ", "๐Ÿฌ"],
14
+ fruit: ["๐ŸŽ", "๐Ÿ", "๐ŸŠ", "๐Ÿ‹", "๐ŸŒ", "๐Ÿ‰", "๐Ÿ‡", "๐Ÿ“", "๐Ÿ’", "๐Ÿ‘", "๐Ÿฅญ", "๐Ÿ", "๐Ÿฅฅ", "๐Ÿฅ"],
15
+ drink: ["โ˜•", "๐Ÿต", "๐Ÿง‹", "๐Ÿงƒ", "๐Ÿฅค", "๐Ÿง‰", "๐Ÿบ", "๐Ÿป", "๐Ÿฅ‚", "๐Ÿท", "๐Ÿฅƒ", "๐Ÿธ", "๐Ÿน"],
16
+ coffee: ["โ˜•", "๐Ÿซ–"],
17
+ weather: ["โ˜€๏ธ", "๐ŸŒค๏ธ", "โ›…", "๐ŸŒฅ๏ธ", "โ˜๏ธ", "๐ŸŒฆ๏ธ", "๐ŸŒง๏ธ", "โ›ˆ๏ธ", "๐ŸŒฉ๏ธ", "๐ŸŒจ๏ธ", "โ„๏ธ", "โ˜ƒ๏ธ", "๐Ÿ’จ", "๐ŸŒช๏ธ", "๐ŸŒˆ", "โ˜”", "โšก"],
18
+ sun: ["โ˜€๏ธ", "๐ŸŒž", "๐ŸŒ…", "๐ŸŒ„"],
19
+ moon: ["๐ŸŒ•", "๐ŸŒ–", "๐ŸŒ—", "๐ŸŒ˜", "๐ŸŒ‘", "๐ŸŒ’", "๐ŸŒ“", "๐ŸŒ”", "๐ŸŒ™", "๐ŸŒš"],
20
+ star: ["โญ", "๐ŸŒŸ", "โœจ", "๐Ÿ’ซ"],
21
+ travel: ["โœˆ๏ธ", "๐Ÿš€", "๐Ÿš—", "๐Ÿš•", "๐ŸšŒ", "๐ŸšŽ", "๐Ÿš“", "๐Ÿš‘", "๐Ÿš’", "๐Ÿš™", "๐Ÿšš", "๐Ÿšฒ", "๐Ÿ›ต", "๐Ÿ๏ธ", "๐Ÿš", "๐Ÿ›ธ", "โ›ต", "๐Ÿ›ณ๏ธ"],
22
+ rocket: ["๐Ÿš€", "๐Ÿ›ธ", "๐Ÿ›ฐ๏ธ"],
23
+ car: ["๐Ÿš—", "๐Ÿš•", "๐Ÿš™", "๐ŸšŒ", "๐ŸŽ๏ธ", "๐Ÿš“", "๐Ÿš‘", "๐Ÿš’"],
24
+ sport: ["โšฝ", "๐Ÿ€", "๐Ÿˆ", "โšพ", "๐ŸŽพ", "๐Ÿ", "๐Ÿ‰", "๐ŸŽฑ", "๐Ÿ“", "๐Ÿธ", "๐ŸฅŠ", "๐Ÿฅ‹", "โ›ณ", "๐Ÿน", "๐ŸŽณ", "๐Ÿ†", "๐Ÿฅ‡", "๐Ÿฅˆ", "๐Ÿฅ‰"],
25
+ music: ["๐ŸŽต", "๐ŸŽถ", "๐ŸŽผ", "๐ŸŽค", "๐ŸŽง", "๐ŸŽท", "๐ŸŽบ", "๐ŸŽธ", "๐ŸŽป", "๐Ÿฅ", "๐ŸŽน"],
26
+ phone: ["๐Ÿ“ฑ", "๐Ÿ“ฒ", "โ˜Ž๏ธ", "๐Ÿ“ž", "๐Ÿ“Ÿ"],
27
+ computer: ["๐Ÿ’ป", "๐Ÿ–ฅ๏ธ", "โŒจ๏ธ", "๐Ÿ–ฑ๏ธ", "๐Ÿ–จ๏ธ", "๐Ÿ’พ", "๐Ÿ’ฟ", "๐Ÿ“€"],
28
+ money: ["๐Ÿ’ฐ", "๐Ÿ’ต", "๐Ÿ’ถ", "๐Ÿ’ท", "๐Ÿ’ด", "๐Ÿช™", "๐Ÿ’ณ", "๐Ÿงพ"],
29
+ fire: ["๐Ÿ”ฅ", "๐Ÿงจ"],
30
+ love: ["โค๏ธ", "๐Ÿ’•", "๐Ÿ’ž", "๐Ÿ’“", "๐Ÿ’—", "๐Ÿ’–", "๐Ÿ’˜", "๐Ÿ’", "๐Ÿฅฐ", "๐Ÿ˜"],
31
+ party: ["๐ŸŽ‰", "๐ŸŽŠ", "๐ŸŽˆ", "๐ŸŽ‚", "๐Ÿฅณ", "๐ŸŽ", "๐Ÿช…"],
32
+ sleep: ["๐Ÿ˜ด", "๐Ÿ’ค", "๐Ÿ›Œ", "๐ŸŒ™"],
33
+ thinking: ["๐Ÿค”", "๐Ÿง", "๐Ÿคจ", "๐Ÿ’ญ"],
34
+ cool: ["๐Ÿ˜Ž", "๐Ÿ•ถ๏ธ", "๐Ÿ˜", "๐Ÿค™"],
35
+ hand: ["๐Ÿ‘", "๐Ÿ‘Ž", "๐Ÿ‘Œ", "โœŒ๏ธ", "๐Ÿคž", "๐ŸคŸ", "๐Ÿค˜", "๐Ÿ‘", "๐Ÿ™Œ", "๐Ÿ™", "๐Ÿค", "๐Ÿ’ช"],
36
+ flag: ["๐Ÿ", "๐Ÿšฉ", "๐ŸŽŒ", "๐Ÿณ๏ธ", "๐Ÿด"],
37
+ christmas: ["๐ŸŽ„", "๐ŸŽ…", "๐Ÿคถ", "๐Ÿง‘โ€๐ŸŽ„", "โ„๏ธ", "โ›„"],
38
+ halloween: ["๐ŸŽƒ", "๐Ÿ‘ป", "๐Ÿ’€", "โ˜ ๏ธ", "๐Ÿง›", "๐ŸงŸ"],
39
+ };
40
+ export async function search(args) {
41
+ const q = (args.query ?? "").trim().toLowerCase();
42
+ if (!q)
43
+ throw new EmojiError("Provide a keyword like smile or heart");
44
+ const limit = Math.min(args.limit ?? 20, 60);
45
+ const keys = Object.keys(CATALOG).filter((k) => k.includes(q) || q.includes(k));
46
+ if (!keys.length)
47
+ return `No emoji found for "${q}"`;
48
+ const seen = new Set();
49
+ const out = [];
50
+ for (const key of keys) {
51
+ for (const e of CATALOG[key]) {
52
+ if (!seen.has(e)) {
53
+ seen.add(e);
54
+ out.push(e);
55
+ }
56
+ if (out.length >= limit)
57
+ break;
58
+ }
59
+ if (out.length >= limit)
60
+ break;
61
+ }
62
+ return `Emoji for "${q}" (${out.length}):\n${out.join(" ")}`;
63
+ }
64
+ export async function categories(args) {
65
+ return `Emoji categories (${Object.keys(CATALOG).length}):\n${Object.keys(CATALOG).sort().join(", ")}`;
66
+ }
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
2
+ import { createServer } from "./server.js";
3
+ const main = async () => { const server = createServer(); await server.connect(new StdioServerTransport()); };
4
+ main().catch((error) => { console.error("Fatal error:", error); process.exit(1); });
package/dist/server.js ADDED
@@ -0,0 +1,38 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { z } from "zod";
3
+ import { categories } from "./api.js";
4
+ import { search } from "./api.js";
5
+ const text = (value) => ({ content: [{ type: "text", text: value }] });
6
+ const textError = (t) => ({ content: [{ type: "text", text: t }], isError: true });
7
+ const READ_ONLY = { readOnlyHint: true, openWorldHint: true };
8
+ const error = (e) => `Error: ${e instanceof Error ? e.message : String(e)}`;
9
+ export function createServer() {
10
+ const server = new McpServer({ name: "emoji-mcp", version: "1.0.0" });
11
+ server.registerTool("search", {
12
+ title: "Search",
13
+ description: "Find emoji matching a keyword.",
14
+ inputSchema: z.object({ query: z.string().describe("Keyword like smile or heart."), limit: z.number().describe("Max results.").optional() }),
15
+ annotations: READ_ONLY,
16
+ }, async (args) => {
17
+ try {
18
+ return text(await search(args));
19
+ }
20
+ catch (e) {
21
+ return textError(error(e));
22
+ }
23
+ });
24
+ server.registerTool("categories", {
25
+ title: "Categories",
26
+ description: "List emoji categories.",
27
+ inputSchema: z.object({}),
28
+ annotations: READ_ONLY,
29
+ }, async (args) => {
30
+ try {
31
+ return text(await categories(args));
32
+ }
33
+ catch (e) {
34
+ return textError(error(e));
35
+ }
36
+ });
37
+ return server;
38
+ }
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "type": "module",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/mrfentmen/emoji-mcp.git"
7
+ },
8
+ "bin": {
9
+ "emoji-mcp": "./dist/index.js"
10
+ },
11
+ "main": "./dist/index.js",
12
+ "files": [
13
+ "dist",
14
+ "server.json",
15
+ "README.md"
16
+ ],
17
+ "scripts": {
18
+ "build": "tsc -p tsconfig.json",
19
+ "start": "node dist/index.js",
20
+ "dev": "npm run build && node dist/index.js"
21
+ },
22
+ "license": "MIT",
23
+ "dependencies": {
24
+ "@modelcontextprotocol/sdk": "^1.0.4",
25
+ "zod": "^3.23.8",
26
+ "jose": "^5.9.0",
27
+ "iban": "^0.0.14",
28
+ "sql-formatter": "^15.4.0",
29
+ "docx": "^9.0.0"
30
+ },
31
+ "devDependencies": {
32
+ "@types/node": "^22.0.0",
33
+ "typescript": "^5.6.0"
34
+ },
35
+ "name": "emoji-mcp",
36
+ "description": "Search emoji by name or keyword locally. No network and no key.",
37
+ "mcpName": "io.github.mrfentmen/emoji-mcp",
38
+ "keywords": [
39
+ "mcp",
40
+ "emoji",
41
+ "symbols",
42
+ "search",
43
+ "unicode"
44
+ ],
45
+ "engines": {
46
+ "node": ">=20"
47
+ }
48
+ }
package/server.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.mrfentmen/emoji-mcp",
4
+ "description": "Search emoji by name or keyword locally. No network and no key.",
5
+ "repository": {
6
+ "url": "https://github.com/mrfentmen/emoji-mcp",
7
+ "source": "github"
8
+ },
9
+ "version": "1.0.0",
10
+ "packages": [
11
+ {
12
+ "registryType": "npm",
13
+ "identifier": "emoji-mcp",
14
+ "version": "1.0.0",
15
+ "transport": {
16
+ "type": "stdio"
17
+ }
18
+ }
19
+ ]
20
+ }