@pipeworx/mcp-emoji 0.1.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/LICENSE +21 -0
- package/README.md +57 -0
- package/package.json +20 -0
- package/server.json +18 -0
- package/src/index.ts +113 -0
- package/tsconfig.json +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pipeworx
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# mcp-emoji
|
|
2
|
+
|
|
3
|
+
Emoji MCP.
|
|
4
|
+
|
|
5
|
+
Part of [Pipeworx](https://pipeworx.io) โ an MCP gateway connecting AI agents to 1173+ live data sources.
|
|
6
|
+
|
|
7
|
+
## Tools
|
|
8
|
+
|
|
9
|
+
| Tool | Description |
|
|
10
|
+
|------|-------------|
|
|
11
|
+
| `emoji_lookup` | Look up an emoji by :shortcode: (e.g. ":fire:" or "fire") to get the character + keywords, OR pass an emoji character to get its shortcode/name. Keyless, offline. |
|
|
12
|
+
| `search_emoji` | Search emoji by keyword/name (e.g. "party", "money", "animal") and return matching emoji with shortcodes. Keyless, offline. |
|
|
13
|
+
|
|
14
|
+
## Quick Start
|
|
15
|
+
|
|
16
|
+
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"mcpServers": {
|
|
21
|
+
"emoji": {
|
|
22
|
+
"url": "https://gateway.pipeworx.io/emoji/mcp"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Or connect to the full Pipeworx gateway for access to all 1173+ data sources:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"mcpServers": {
|
|
33
|
+
"pipeworx": {
|
|
34
|
+
"url": "https://gateway.pipeworx.io/mcp"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Using with ask_pipeworx
|
|
41
|
+
|
|
42
|
+
Instead of calling tools directly, you can ask questions in plain English:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
ask_pipeworx({ question: "your question about Emoji data" })
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The gateway picks the right tool and fills the arguments automatically.
|
|
49
|
+
|
|
50
|
+
## More
|
|
51
|
+
|
|
52
|
+
- [All tools and guides](https://github.com/pipeworx-io/examples)
|
|
53
|
+
- [pipeworx.io](https://pipeworx.io)
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pipeworx/mcp-emoji",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Emoji MCP.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"types": "src/index.ts",
|
|
8
|
+
"keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "emoji"],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/pipeworx-io/mcp-emoji"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"typecheck": "tsc --noEmit"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"typescript": "^5.7.0"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.pipeworx-io/emoji",
|
|
4
|
+
"title": "Emoji",
|
|
5
|
+
"description": "Emoji MCP.",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"websiteUrl": "https://pipeworx.io/packs/emoji",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/pipeworx-io/mcp-emoji",
|
|
10
|
+
"source": "github"
|
|
11
|
+
},
|
|
12
|
+
"remotes": [
|
|
13
|
+
{
|
|
14
|
+
"type": "streamable-http",
|
|
15
|
+
"url": "https://gateway.pipeworx.io/emoji/mcp"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
interface McpToolDefinition {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
inputSchema: {
|
|
5
|
+
type: 'object';
|
|
6
|
+
properties: Record<string, unknown>;
|
|
7
|
+
required?: string[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface McpToolExport {
|
|
12
|
+
tools: McpToolDefinition[];
|
|
13
|
+
callTool: (name: string, args: Record<string, unknown>) => Promise<unknown>;
|
|
14
|
+
meter?: { credits: number };
|
|
15
|
+
cost?: Record<string, unknown>;
|
|
16
|
+
provider?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Emoji MCP.
|
|
21
|
+
*
|
|
22
|
+
* Keyless, offline: look up an emoji by :shortcode: (or reverse โ get the
|
|
23
|
+
* shortcode/name for an emoji character) and search emoji by keyword, from an
|
|
24
|
+
* inlined table of common emoji. Pure lookup โ no API, no key.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
// [emoji, shortcode, keywords]
|
|
29
|
+
const DATA: [string, string, string][] = [
|
|
30
|
+
['๐', 'grinning', 'happy smile face'], ['๐', 'smiley', 'happy joy'], ['๐', 'smile', 'happy laugh'],
|
|
31
|
+
['๐', 'grin', 'happy'], ['๐', 'joy', 'laugh cry tears funny'], ['๐คฃ', 'rofl', 'laugh rolling funny'],
|
|
32
|
+
['๐', 'slightly_smiling_face', 'smile'], ['๐', 'wink', 'flirt'], ['๐', 'blush', 'happy smile'],
|
|
33
|
+
['๐', 'heart_eyes', 'love like'], ['๐', 'kissing_heart', 'kiss love'], ['๐', 'sunglasses', 'cool'],
|
|
34
|
+
['๐ค', 'thinking', 'think hmm consider'], ['๐', 'neutral_face', 'meh'], ['๐', 'roll_eyes', 'annoyed'],
|
|
35
|
+
['๐ด', 'sleeping', 'sleep tired zzz'], ['๐ญ', 'sob', 'cry sad tears'], ['๐ข', 'cry', 'sad tear'],
|
|
36
|
+
['๐
', 'sweat_smile', 'relief nervous'], ['๐ค', 'triumph', 'angry proud'], ['๐ก', 'rage', 'angry mad'],
|
|
37
|
+
['๐ฅณ', 'partying_face', 'party celebrate'], ['๐คฏ', 'exploding_head', 'mind blown shock'], ['๐ฑ', 'scream', 'fear shock'],
|
|
38
|
+
['๐ค', 'hugs', 'hug'], ['๐คฉ', 'star_struck', 'excited amazed'], ['๐', 'innocent', 'angel'],
|
|
39
|
+
['๐', 'thumbsup', 'yes good approve like'], ['๐', 'thumbsdown', 'no bad dislike'], ['๐', 'clap', 'applause bravo'],
|
|
40
|
+
['๐', 'pray', 'please thanks hope'], ['๐', 'raised_hands', 'celebrate praise'], ['๐', 'wave', 'hello bye hi'],
|
|
41
|
+
['๐ค', 'handshake', 'deal agree'], ['โ๏ธ', 'v', 'peace victory'], ['๐ค', 'crossed_fingers', 'luck hope'],
|
|
42
|
+
['๐ช', 'muscle', 'strong flex gym'], ['๐', 'eyes', 'look see watch'], ['๐ง ', 'brain', 'smart think'],
|
|
43
|
+
['โค๏ธ', 'heart', 'love red'], ['๐งก', 'orange_heart', 'love'], ['๐', 'yellow_heart', 'love'],
|
|
44
|
+
['๐', 'green_heart', 'love'], ['๐', 'blue_heart', 'love'], ['๐', 'purple_heart', 'love'],
|
|
45
|
+
['๐ค', 'black_heart', 'love'], ['๐', 'broken_heart', 'sad heartbreak'], ['๐ฏ', '100', 'perfect score keep it'],
|
|
46
|
+
['๐ฅ', 'fire', 'lit hot flame'], ['โจ', 'sparkles', 'shine magic new'], ['โญ', 'star', 'favorite'],
|
|
47
|
+
['๐', 'tada', 'party celebrate congrats'], ['๐', 'confetti_ball', 'party celebrate'], ['๐', 'balloon', 'party'],
|
|
48
|
+
['๐', 'rocket', 'launch ship fast space'], ['๐ก', 'bulb', 'idea light'], ['โก', 'zap', 'lightning fast power'],
|
|
49
|
+
['๐ฐ', 'moneybag', 'money cash rich'], ['๐ธ', 'money_with_wings', 'spend money'], ['๐ต', 'dollar', 'money cash'],
|
|
50
|
+
['๐', 'chart_with_upwards_trend', 'growth up stocks'], ['๐', 'chart_with_downwards_trend', 'down loss'],
|
|
51
|
+
['โ
', 'white_check_mark', 'yes done correct ok'], ['โ', 'x', 'no wrong cancel'], ['โ ๏ธ', 'warning', 'caution alert'],
|
|
52
|
+
['โ', 'question', 'help ask'], ['โ', 'exclamation', 'important'], ['๐', 'bell', 'notification alert'],
|
|
53
|
+
['๐', 'lock', 'secure private'], ['๐', 'key', 'password access'], ['๐ ๏ธ', 'hammer_and_wrench', 'tools fix build'],
|
|
54
|
+
['๐ถ', 'dog', 'puppy pet'], ['๐ฑ', 'cat', 'kitten pet'], ['๐ฆ', 'fox', 'animal'], ['๐ป', 'bear', 'animal'],
|
|
55
|
+
['๐ฆ', 'lion', 'animal'], ['๐ธ', 'frog', 'animal'], ['๐ข', 'turtle', 'slow animal'], ['๐ฆ', 'unicorn', 'magic'],
|
|
56
|
+
['๐', 'bee', 'insect'], ['๐ฆ', 'butterfly', 'insect'], ['๐', 'earth_africa', 'world globe planet'],
|
|
57
|
+
['๐', 'crescent_moon', 'night'], ['โ๏ธ', 'sunny', 'sun weather'], ['โ๏ธ', 'cloud', 'weather'],
|
|
58
|
+
['๐ง๏ธ', 'rain_cloud', 'rain weather'], ['โ๏ธ', 'snowflake', 'snow cold winter'], ['๐', 'rainbow', 'pride color'],
|
|
59
|
+
['๐', 'pizza', 'food'], ['๐', 'hamburger', 'food burger'], ['๐ฎ', 'taco', 'food'], ['๐ฃ', 'sushi', 'food'],
|
|
60
|
+
['โ', 'coffee', 'drink caffeine'], ['๐บ', 'beer', 'drink'], ['๐ท', 'wine_glass', 'drink'], ['๐', 'birthday', 'cake party'],
|
|
61
|
+
['๐', 'apple', 'fruit food'], ['๐ฅ', 'avocado', 'food'], ['โฝ', 'soccer', 'football sport'], ['๐', 'basketball', 'sport'],
|
|
62
|
+
['๐ฎ', 'video_game', 'gaming play'], ['๐ต', 'musical_note', 'music song'], ['๐ฑ', 'iphone', 'phone mobile'],
|
|
63
|
+
['๐ป', 'computer', 'laptop code'], ['โจ๏ธ', 'keyboard', 'type code'], ['๐ง', 'email', 'mail message'],
|
|
64
|
+
['๐', 'pushpin', 'pin location'], ['๐', 'paperclip', 'attach'], ['๐', 'link', 'url chain'],
|
|
65
|
+
['๐ฏ', 'dart', 'target goal bullseye'], ['๐', 'trophy', 'win award champion'], ['๐ฅ', 'first_place_medal', 'gold win'],
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
const byShort = new Map<string, [string, string, string]>();
|
|
69
|
+
const byEmoji = new Map<string, [string, string, string]>();
|
|
70
|
+
for (const d of DATA) { byShort.set(d[1], d); byEmoji.set(d[0], d); }
|
|
71
|
+
|
|
72
|
+
const tools: McpToolExport['tools'] = [
|
|
73
|
+
{
|
|
74
|
+
name: 'emoji_lookup',
|
|
75
|
+
description: 'Look up an emoji by :shortcode: (e.g. ":fire:" or "fire") to get the character + keywords, OR pass an emoji character to get its shortcode/name. Keyless, offline.',
|
|
76
|
+
inputSchema: { type: 'object', properties: { input: { type: 'string', description: 'A :shortcode:, a bare shortcode, or an emoji character.' } }, required: ['input'] },
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'search_emoji',
|
|
80
|
+
description: 'Search emoji by keyword/name (e.g. "party", "money", "animal") and return matching emoji with shortcodes. Keyless, offline.',
|
|
81
|
+
inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'A keyword to search.' }, limit: { type: 'number', description: 'Max results (default 20).' } }, required: ['query'] },
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
async function callTool(name: string, args: Record<string, unknown>): Promise<unknown> {
|
|
86
|
+
switch (name) {
|
|
87
|
+
case 'emoji_lookup': {
|
|
88
|
+
const input = reqStr(args, 'input', '":fire:"').trim();
|
|
89
|
+
const short = input.replace(/^:|:$/g, '');
|
|
90
|
+
const byS = byShort.get(short.toLowerCase());
|
|
91
|
+
if (byS) return { input, found: true, emoji: byS[0], shortcode: byS[1], keywords: byS[2].split(' ') };
|
|
92
|
+
const byE = byEmoji.get(input) ?? byEmoji.get([...input][0]);
|
|
93
|
+
if (byE) return { input, found: true, emoji: byE[0], shortcode: byE[1], keywords: byE[2].split(' ') };
|
|
94
|
+
return { input, found: false, reason: 'Not in the emoji table. Try search_emoji by keyword.' };
|
|
95
|
+
}
|
|
96
|
+
case 'search_emoji': {
|
|
97
|
+
const q = reqStr(args, 'query', '"party"').toLowerCase();
|
|
98
|
+
const limit = Math.max(1, Math.min(100, typeof args.limit === 'number' ? args.limit : 20));
|
|
99
|
+
const hits = DATA.filter(([, s, k]) => s.includes(q) || k.includes(q)).slice(0, limit).map(([e, s, k]) => ({ emoji: e, shortcode: s, keywords: k.split(' ') }));
|
|
100
|
+
return { query: q, count: hits.length, results: hits };
|
|
101
|
+
}
|
|
102
|
+
default:
|
|
103
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function reqStr(args: Record<string, unknown>, key: string, ex: string): string {
|
|
108
|
+
const v = args[key];
|
|
109
|
+
if (typeof v !== 'string' || !v.trim()) throw new Error(`Required argument "${key}" is missing. Pass a string like ${ex}.`);
|
|
110
|
+
return v;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export default { tools, callTool, meter: { credits: 1 } } satisfies McpToolExport;
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"outDir": "dist",
|
|
10
|
+
"rootDir": "src",
|
|
11
|
+
"declaration": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["src"]
|
|
14
|
+
}
|