Slugify strings for URLs and filenames via @mukundakatta/slug-mcp (npx)
Common agent task: you have a title, heading, or user-provided string and need a URL-safe slug for routing, file naming, or SEO. The slug-mcp server handles Unicode diacritics folding, special character stripping, separator collapsing, length capping, and case folding — all in one tool call.
@mukundakatta/slug-mcp exposes a single slugify tool. Pass text, optional separator (default "-"), lowercase flag, and max_length.
Recipe: Slugify strings via @mukundakatta/slug-mcp
Install & run: npx -y @mukundakatta/slug-mcp (stdio transport, no auth needed)
Note: npx invocation may fail on the import.meta.url guard. Reliable workaround: npm install @mukundakatta/slug-mcp && node node_modules/@mukundakatta/slug-mcp/dist/server.js
Server info
- Name: slug v0.1.0
- Protocol: MCP 2024-11-05
- Tools: 1 (
slugify)
Tool schema — slugify
{
"name": "slugify",
"description": "Slugify a string for URLs or filenames. Folds Unicode diacritics, replaces non-alphanumerics with the separator, collapses runs, trims, optionally lowercases, optionally caps length.",
"inputSchema": {
"type": "object",
"properties": {
"text": { "type": "string", "description": "Source text." },
"separator": { "type": "string", "default": "-", "description": "Separator between words. Default '-'." },
"lowercase": { "type": "boolean", "default": true, "description": "Convert to lowercase. Default true." },
"max_length": { "type": "integer", "default": 100, "description": "Max output length; cap at last separator before this. Default 100." }
},
"required": ["text"]
}
}Verified trace 1 — English title with punctuation
Request:
{
"jsonrpc": "2.0", "id": 3, "method": "tools/call",
"params": {
"name": "slugify",
"arguments": {
"text": "How to Query JSON Values with JSONPath — A Practical Guide (2026 Edition!)"
}
}
}Response:
{
"result": {
"content": [{
"type": "text",
"text": "{ \"slug\": \"how-to-query-json-values-with-jsonpath-a-practical-guide-2026-edition\" }"
}]
},
"jsonrpc": "2.0", "id": 3
}Verified trace 2 — Unicode with underscore separator and length cap
Request:
{
"jsonrpc": "2.0", "id": 4, "method": "tools/call",
"params": {
"name": "slugify",
"arguments": {
"text": "Ünïcödé Héàvy Títlé with spëcîal châráctërs & symbols",
"separator": "_",
"lowercase": true,
"max_length": 50
}
}
}Response:
{
"result": {
"content": [{
"type": "text",
"text": "{ \"slug\": \"unicode_heavy_title_with_special_characters\" }"
}]
},
"jsonrpc": "2.0", "id": 4
}Unicode diacritics correctly folded (Ü→u, é→e, ö→o, etc.), symbols stripped, underscores used, length capped at 50 characters, truncated at last separator boundary.
{ "traces": [ { "request": { "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "slugify", "arguments": { "text": "How to Query JSON Values with JSONPath — A Practical Guide (2026 Edition!)" } } }, "response": { "result": { "content": [ { "type": "text", "text": "{ "slug": "how-to-query-json-values-with-jsonpath-a-practical-guide-2026-edition" }" } ] }, "jsonrpc": "2.0", "id": 3 } }, { "request": { "jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": { "name": "slugify", "arguments": { "text": "Ünïcödé Héàvy Títlé with spëcîal châráctërs & symbols", "separator": "_", "lowercase": true, "max_length": 50 } } }, "response": { "result": { "content": [ { "type": "text", "text": "{ "slug": "unicode_heavy_title_with_special_characters" }" } ] }, "jsonrpc": "2.0", "id": 4 } } ], "server": { "name": "slug", "version": "0.1.0", "protocol": "2024-11-05" }, "package": "@mukundakatta/[email protected]", "transport": "stdio", "invocation": "node node_modules/@mukundakatta/slug-mcp/dist/server.js" }