Convert strings between 12 case styles (camel, pascal, snake, kebab, train, dot, path, title, etc.) via @mukundakatta/case-mcp
Single-tool MCP server for converting strings between 12 case styles. Auto-detects input format (camelCase, snake_case, kebab-case, space-separated, etc.) and converts to any target style. Sub-millisecond after JIT warmup.
@mukundakatta/case-mcp v0.1.0 — verified recipe
Install & run: npm install @mukundakatta/case-mcp → entry dist/server.js
Tool: convert
Params: {text: string, style: string} Styles (12): camel, pascal, snake, constant, kebab, train, dot, path, title, lower, upper, sentence
30 calls executed, 29 OK + 1 correct rejection
All 12 styles from "hello world":
| Style | Result |
|---|---|
| camel | helloWorld |
| pascal | HelloWorld |
| snake | hello_world |
| constant | HELLO_WORLD |
| kebab | hello-world |
| train | Hello-World |
| dot | hello.world |
| path | hello/world |
| title | Hello World |
| lower | hello world |
| upper | HELLO WORLD |
| sentence | Hello world |
Cross-format conversion (auto-detects input):
myVariableName→ snake:my_variable_name✓myVariableName→ kebab:my-variable-name✓my_variable_name→ camel:myVariableName✓my-css-class→ pascal:MyCssClass✓
Acronym handling (correct):
parseHTMLDocument→ snake:parse_html_document✓parseHTMLDocument→ kebab:parse-html-document✓
⚠️ KEY GOTCHAS:
- Unicode chars STRIPPED/SPLIT —
"Merhaba Dünya"→ camel:"merhabaDNya"(ü dropped, D and nya split); snake:"merhaba_d_nya". Only ASCII letters survive properly. - Numbers split aggressively —
"my2ndVariable"→ snake:"my_2_nd_variable"(splits at every letter-digit boundary within "2nd"). - Whitespace/separators normalized — leading/trailing spaces trimmed, multiple separators collapsed:
" hello world "→"hello_world","foo--bar__baz"→"fooBarBaz". - Empty string handled — returns
""(no error). - Invalid style → clear error —
"unknown style: nonexistent".
Performance: p50=0ms (sub-millisecond after first-call JIT ~2ms). Pure in-memory, no I/O.
Similar but different: This is a STRING case converter, not a file renamer or formatter. Different from sqlfmt-mcp (SQL formatting) or slug-mcp (URL slugification).
{ "server": "@mukundakatta/case-mcp", "version": "0.1.0", "transport": "stdio", "entry": "dist/server.js", "tools": ["convert"], "trace": [ { "call": "convert", "args": { "text": "hello world", "style": "camel" }, "result": { "result": "helloWorld" }, "ms": 2 }, { "call": "convert", "args": { "text": "hello world", "style": "snake" }, "result": { "result": "hello_world" }, "ms": 0 }, { "call": "convert", "args": { "text": "hello world", "style": "constant" }, "result": { "result": "HELLO_WORLD" }, "ms": 0 }, { "call": "convert", "args": { "text": "hello world", "style": "kebab" }, "result": { "result": "hello-world" }, "ms": 1 }, { "call": "convert", "args": { "text": "hello world", "style": "train" }, "result": { "result": "Hello-World" }, "ms": 0 }, { "call": "convert", "args": { "text": "hello world", "style": "dot" }, "result": { "result": "hello.world" }, "ms": 0 }, { "call": "convert", "args": { "text": "hello world", "style": "path" }, "result": { "result": "hello/world" }, "ms": 1 }, { "call": "convert", "args": { "text": "hello world", "style": "title" }, "result": { "result": "Hello World" }, "ms": 0 }, { "call": "convert", "args": { "text": "hello world", "style": "sentence" }, "result": { "result": "Hello world" }, "ms": 0 }, { "call": "convert", "args": { "text": "myVariableName", "style": "snake" }, "result": { "result": "my_variable_name" }, "ms": 0 }, { "call": "convert", "args": { "text": "my_variable_name", "style": "camel" }, "result": { "result": "myVariableName" }, "ms": 0 }, { "call": "convert", "args": { "text": "my-css-class", "style": "pascal" }, "result": { "result": "MyCssClass" }, "ms": 0 }, { "call": "convert", "args": { "text": "parseHTMLDocument", "style": "snake" }, "result": { "result": "parse_html_document" }, "ms": 0 }, { "call": "convert", "args": { "text": "Merhaba Dünya", "style": "camel" }, "result": { "result": "merhabaDNya" }, "ms": 0 }, { "call": "convert", "args": { "text": "Merhaba Dünya", "style": "snake" }, "result": { "result": "merhaba_d_nya" }, "ms": 0 }, { "call": "convert", "args": { "text": "my2ndVariable", "style": "snake" }, "result": { "result": "my_2_nd_variable" }, "ms": 0 }, { "call": "convert", "args": { "text": "", "style": "camel" }, "result": { "result": "" }, "ms": 0 }, { "call": "convert", "args": { "text": "foo--bar__baz", "style": "camel" }, "result": { "result": "fooBarBaz" }, "ms": 0 }, { "call": "convert", "args": { "text": "hello world", "style": "nonexistent" }, "error": "unknown style: nonexistent", "ms": 1 } ], "summary": { "total_calls": 30, "success": 29, "correct_rejections": 1, "p50_ms": 0 } }