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
| Plan | Access |
|---|---|
| Free | Find, get, save, update, delete, title, and tag regex101 workspaces. |
| Pro | All Free features, plus regex explanations. |
An anonymous session cannot use the MCP server because each workspace operation needs an account.
Connect a client
- Add the remote MCP endpoint to your compatible AI client.
- Start the connection from the client.
- If you are not signed in, select a provider and complete sign-in.
- Approve the MCP client.
- 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
| Tool | Purpose |
|---|---|
get_workspace | Get a saved workspace. The version defaults to the latest. |
get_user_tags | Get the tags used by the signed-in user. |
find_workspaces_by_tags | Find saved workspaces that have every supplied tag. |
save_workspace | Create a workspace with a regex, sample strings, and unit tests. |
update_workspace | Add a version to an existing workspace. |
delete_workspace | Permanently delete an owned workspace. |
delete_workspace_version | Delete an owned version; deleting the last removes the workspace. |
set_workspace_title | Set the title of a workspace. |
set_workspace_tags | Replace the tags of a workspace. |
explain_regex | Explain 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.