Skip to main content

MCP server

The regex101 API exposes a Model Context Protocol (MCP) endpoint for compatible AI clients. A client can save and update workspaces without direct REST requests.

Use this remote MCP endpoint:

https://regex101.com/mcp

Plan access

PlanAccess
FreeFind, get, save, update, delete, title, and tag regex101 workspaces.
ProAll Free features, plus regex explanations.

An anonymous session cannot use the MCP server because each workspace operation needs an account.

Connect a client

  1. Add the remote MCP endpoint to your compatible AI client.
  2. Start the connection from the client.
  3. If you are not signed in, select a provider and complete sign-in.
  4. Approve the MCP client.
  5. Return to the client.

The server can support Google, GitHub, and a custom OIDC provider. The custom provider label is deployment-specific. GET https://regex101.com/connect/providers lists the configured providers.

The MCP client stores the session credential as an access token. Do not put the token in a prompt or configuration that the model can read.

Tools

ToolPurpose
get_workspaceGet a saved workspace. The version defaults to the latest.
get_user_tagsGet the tags used by the signed-in user.
find_workspaces_by_tagsFind saved workspaces that have every supplied tag.
save_workspaceCreate a workspace with a regex, sample strings, and unit tests.
update_workspaceAdd a version to an existing workspace.
delete_workspacePermanently delete an owned workspace.
delete_workspace_versionDelete an owned version; deleting the last removes the workspace.
set_workspace_titleSet the title of a workspace.
set_workspace_tagsReplace the tags of a workspace.
explain_regexExplain a regex for a Pro account.

Workspace workflow

For a new regex, the client calls save_workspace. It can then add a clear title and relevant tags.

For a change to the same regex, the client keeps the permalinkFragment and calls update_workspace. This action creates a new version under the same workspace.

Unit tests can include positive, negative, boundary, and regression cases. They help the client preserve existing behavior when it changes the regex.

Authentication

The MCP endpoint uses an OAuth authorization-code flow with PKCE. After approval, the API returns the signed website session credential as the bearer token.

The API validates the session before a tool runs. MCP tools use the same ownership and Pro rules as REST requests. Direct API requests can use the same bearer token.