diff --git a/docs/source/config_file.rst b/docs/source/config_file.rst
index de51f0c796fd..b0c580af639b 100644
--- a/docs/source/config_file.rst
+++ b/docs/source/config_file.rst
@@ -817,6 +817,15 @@ section of the command line docs.
    Note: the exact list of flags enabled by :confval:`strict` may
    change over time.
 
+.. confval:: user_builtins_name
+
+   :type: comma-separated list of strings
+
+    Disable name-defined error checking for the given values.
+
+    Note: This setting should be used *only* if new values have been defined
+    into the ``builtins`` module.
+
 
 Configuring error messages
 **************************
diff --git a/mypy/config_parser.py b/mypy/config_parser.py
index 0e033471d2e9..8a690765f9db 100644
--- a/mypy/config_parser.py
+++ b/mypy/config_parser.py
@@ -193,6 +193,7 @@ def split_commas(value: str) -> list[str]:
     "exclude": lambda s: [s.strip()],
     "packages": try_split,
     "modules": try_split,
+    "user_builtins_name": try_split,
 }
 
 # Reuse the ini_config_types and overwrite the diff
@@ -215,6 +216,7 @@ def split_commas(value: str) -> list[str]:
         "exclude": str_or_array_as_list,
         "packages": try_split,
         "modules": try_split,
+        "user_builtins_name": try_split,
     }
 )
 
diff --git a/mypy/main.py b/mypy/main.py
index e5afb05e873b..67de95a072c0 100644
--- a/mypy/main.py
+++ b/mypy/main.py
@@ -1282,6 +1282,13 @@ def add_invertible_flag(
         ),
         group=code_group,
     )
+    code_group.add_argument(
+        "--user-builtins-name",
+        action="append",
+        metavar="NAME",
+        default=[],
+        help="List of name to ignore; can repeat for more names",
+    )
     code_group.add_argument(
         "-m",
         "--module",
diff --git a/mypy/options.py b/mypy/options.py
index 17fea6b0bf29..98d76c426a21 100644
--- a/mypy/options.py
+++ b/mypy/options.py
@@ -55,6 +55,7 @@ class BuildType:
     "strict_concatenate",
     "strict_equality",
     "strict_optional",
+    "user_builtins_name",
     "warn_no_return",
     "warn_return_any",
     "warn_unreachable",
@@ -138,6 +139,8 @@ def __init__(self) -> None:
         # File names, directory names or subpaths to avoid checking
         self.exclude: list[str] = []
         self.exclude_gitignore: bool = False
+        # User defined builtins names to skip name-defined checking
+        self.user_builtins_name: list[str] = []
 
         # disallow_any options
         self.disallow_any_generics = False
diff --git a/mypy/semanal.py b/mypy/semanal.py
index 586094b7a6fe..5a70ba258fab 100644
--- a/mypy/semanal.py
+++ b/mypy/semanal.py
@@ -6340,6 +6340,9 @@ def lookup(
                     return None
                 node = table[name]
                 return node
+        # 6. User Defined Builtins
+        if name in self.options.user_builtins_name:
+            return None
         # Give up.
         if not implicit_name and not suppress_errors:
             self.name_not_defined(name, ctx)
diff --git a/test-data/unit/semanal-errors.test b/test-data/unit/semanal-errors.test
index 52c658c97c3b..73b1ad4ae65d 100644
--- a/test-data/unit/semanal-errors.test
+++ b/test-data/unit/semanal-errors.test
@@ -1507,3 +1507,16 @@ def bad_kwargs(**kwargs: Unpack[TVariadic]):  # E: Unpack item in ** argument mu
     pass
 
 [builtins fixtures/dict.pyi]
+
+[case testUserBuiltinsName]
+# flags: --user-builtins-name foo
+foo()
+egg()
+[out]
+main:3: error: Name "egg" is not defined
+
+[case testUserBuiltinsNameMultiple]
+# flags: --user-builtins-name foo --user-builtins-name egg
+foo()
+egg()
+[out]