# URL Slug Generator MCP

> URL Slug Generator handles complex international text, turning titles or categories into 100% SEO-safe slugs. It strips accents, emojis, special symbols, and excessive punctuation from any language, ensuring your CMS routing never fails due to invalid characters. Stop getting 404s when publishing multilingual content.

## Overview
- **Category:** data
- **Price:** Free
- **Tags:** slug, url, seo, cms, wordpress

## Description

When your AI agent publishes anything online—a blog post, a product listing, an article—you need clean URLs. This MCP Server handles that cleanup deterministically. You won't get 404 errors because of bad characters in your titles.

**Generate SEO Slugs:** Throw any title or phrase at this tool, and it spits out a URL slug. It strips every accent, emoji, and special symbol from whatever language you give it. The output is always lowercase, safely hyphenated, and formatted perfectly for Google and major CMS platforms. You input `Ação & Coração!` and get `acao-e-coracao`. Simple.

**Clean International Text:** This functionality processes non-Latin scripts—think Portuguese or Spanish characters—and converts them into safe ASCII slugs suitable for web routing. It doesn't just strip the accents; it correctly translates the character set so your CMS handles it like a normal English slug, guaranteeing valid routes even if you’re publishing multilingual content.

**Validate Cron Syntax:** This server also lets you check scheduling rules. You feed it a standard five-field cron string, and it reports the validation status. It checks field ranges, step values, and overall syntax correctness offline, confirming that your schedule is valid before you try to run it.

You can use this single service for two completely different kinds of cleanup: text slugs and scheduled job strings. The slug generation process ensures that whether you're dealing with complex characters from any language or just random punctuation, the resulting string will be perfectly ready for a web URL. It handles everything from accented vowels to weird Unicode symbols.

The cron validation tool specifically tests five distinct fields—minute, hour, day of month, month, and day of week—against established rules. If you're building complex automated workflows, you can confirm the syntax is correct before any job fails because of a simple typo in your schedule string. This isn't guesswork; it’s a definitive check against known scheduling standards.

When combining these tools, you get reliable data preparation across wildly different domains. You ensure that both your public-facing URLs and your internal scheduled jobs use syntax that won't crash your system. The slug generator keeps your web presence clean by normalizing text from any source into a universally accepted format. Meanwhile, the cron validator gives you peace of mind over complex scheduling logic.

It’s about guaranteed output. You don't have to worry if an LLM is going to mess up diacritics or leave in invalid characters. This server cleans it up and validates it so your agents can publish without breaking anything.

## Tools

### validate_cron_expression
Accepts a 5-field cron string and reports validation status, checking field ranges, step values, and syntax correctness offline.

## Prompt Examples

**Prompt:** 
```
Generate a URL slug for this article title: `Ação e Coração! O Guia Definitivo 2026.`
```

**Response:** 
```
Generated URL Slug: `acao-e-coracao-o-guia-definitivo-2026`
```

**Prompt:** 
```
Turn this weird string `My Awesome   Product --- 100% Good` into a clean SEO slug.
```

**Response:** 
```
Generated URL Slug: `my-awesome-product-100-good`
```

**Prompt:** 
```
Create a URL-safe route for the category `café & bistrô`.
```

**Response:** 
```
Generated URL Slug: `cafe-bistro`
```

## Capabilities

### Generate SEO Slugs
Input a title or phrase in any language and receive a URL slug that strips all accents, emojis, and special characters.

### Clean International Text
Processes non-Latin scripts (like Portuguese or Spanish) and converts them into safe ASCII slugs suitable for web routing.

### Validate Cron Syntax
Checks a standard 5-field cron string against known rules, confirming if the syntax is valid before scheduling it.

## Use Cases

### Publishing an International Blog Post
A Content Manager writes a post titled 'El arte de la cocina italiana.' Their AI agent calls the URL Slug Generator. The tool returns `el-arte-de-la-cocina-italiana`. This prevents the 404 error that would happen if the slug kept the accents.

### Cleaning Up E-commerce Category Names
A developer needs a route for 'Jogos & Esportes'. Instead of manually fixing it, they run the MCP. The tool automatically generates `jogos-e-esportes`, creating reliable routes across all product categories.

### Refactoring Old Product Slugs
The team has hundreds of old slugs with bad characters (`product!!!`). They run the generator against a batch list. The tool cleans them up, giving them `product`, ready for a bulk migration script.

### Validating Automation Schedules
A DevOps engineer runs an automation check. The agent uses the `validate_cron_expression` tool on '0 9 * * 1-5'. It confirms that the syntax is correct, letting the system know the schedule won't fail due to poor formatting.

## Benefits

- Stops 404 errors from multilingual content. If your agent publishes 'Coração!' or 'Café', this tool guarantees the slug will be valid, preventing broken links and lost traffic.
- Guarantees perfect CMS formatting. The output is always lowercase and hyphen-separated—the exact format Google expects for clean URLs.
- Handles messy input strings. It strips out excessive dashes, weird spacing (`---`), emojis, and punctuation that usually trip up slug generation.
- Supports global content. Because it uses standard transliteration logic, you don't have to worry about specific language rules (like diacritics in French or Portuguese).
- Utility for scheduling validation. The `validate_cron_expression` tool lets your agent check if a scheduled job has correct syntax before running the task.

## How It Works

The bottom line is: your AI client gets back a guaranteed URL string that won't break your website.

1. You pass the raw text (e.g., 'The best Café & Bistro!') to your AI client.
2. The MCP Server runs the text through `slugify`, stripping accents, special symbols, and converting it to lowercase ASCII.
3. Your agent receives a clean, hyphenated slug (`the-best-cafe-bistro`) ready for use in code or CMS inputs.

## Frequently Asked Questions

**How does URL Slug Generator handle accents?**
It strips all diacritics and converts accented characters into their base ASCII equivalents. For example, 'Ação' becomes 'acao'. This prevents 404 errors in multilingual CMSs.

**Can URL Slug Generator handle emojis?**
Yes. The tool detects and strips all emoji characters, ensuring they don't end up in your final slug. It only keeps safe letters and hyphens.

**Is the URL Slug Generator reliable for non-English text?**
It uses standard transliteration methods to handle complex international scripts. You can feed it titles from Portuguese, Spanish, or French, and it generates a clean slug every time.

**Can I use the URL Slug Generator for cron validation too?**
No. The URL Slug Generator handles text to slugs. For checking job scheduling syntax, you need to use the `validate_cron_expression` tool found within this server.

**How does the 'validate_cron_expression' tool report syntax errors?**
It provides field-level error diagnostics. Instead of just saying the cron string is invalid, it tells you exactly which component—like a range or step value—is incorrect.

**Does the URL Slug Generator ensure SEO compatibility across all CMS platforms?**
Yes, it creates slugs that adhere to universal standards. By forcing lowercase and using safe hyphenation, it prevents character issues common with various content management systems (CMS).

**Is the URL Slug Generator deterministic when processing text inputs?**
The output is always consistent. Since it uses `slugify`, running the same title multiple times will yield the exact same slug, which is crucial for reliable automated pipelines.

**What specific format does 'validate_cron_expression' require?**
The tool requires a standard five-field cron string. You must provide values for minute, hour, day of the month, month, and day of the week to get proper validation.

**Does it support non-Latin languages?**
Yes, it intelligently transliterates Cyrillic, Arabic, Vietnamese, and more into safe Latin characters.

**Will it leave trailing hyphens?**
No, it is strictly configured to trim trailing hyphens and prevent double-hyphens.

**Why use an MCP for this?**
Because LLMs hallucinate URL encoding. Passing it through a deterministic V8 engine guarantees a 0% error rate for your CMS routing.