Regex to NFA/DFA Visualizer

Regex to NFA/DFA Visualizer MCP Connector for Claude

A+

Convert regular expressions to NFA and DFA structures with detailed state transition tables.

2 tools Official Updated Oct 1, 2026 Official Vinkius Partner

This MCP server provides a way to visualize formal language theory. Use regex_to_nfa to transform any regular expression into a Nondeterministic Finite Automaton using Thompson's construction. You can then use nfa_to_dfa to convert that NFA into a Deterministic Finite Automaton via subset construction. Additionally, the check_language_finiteness tool allows you to determine if the language represented by an automaton is finite or infinite by analyzing its cycles.

regexnfadfaautomataformal-languagesvisualizer

2 tools expose this connector's capabilities to your AI agent.

regex_to_nfa

g., "abc") and get the NFA structure with states and transitions. Converts a regex pattern to an NFA

nfa_to_dfa

Converts an NFA to a DFA

See how to talk to your AI agent using Regex to NFA/DFA Visualizer.

Convert the regex (a|b)* to an NFA.

The NFA for (a|b)* includes states s0, s1, and s2, with transitions for 'a', 'b', and epsilon.

Is the language defined by this NFA finite? {"states": ["s0", "s1"], "transitions": [{"from_state": "s0", "symbol": "a", "to_states": ["s0"]}]}

No, the language is infinite because there is a cycle in the automaton that can reach an accepting state.

Transform this NFA to a DFA. {"alphabet": ["a"], "states": ["s0", "s1"], "start_state": "s0", "accept_states": ["s1"], "transitions": [{"from_state": "s0", "symbol": "a", "to_states": ["s1"]}]}

The resulting DFA contains states representing the epsilon closures of the original NFA states, with unambiguous transitions for each alphabet symbol.

Use the `regex_to_nfa` tool by providing your regular expression pattern as input.

Related Connectors