Agents and automation

Connect a coding agent to the Fricle browser with MCP

Connect an MCP-compatible client on this device to read the tabs you have open in Fricle. If you are planning a weekend class, ask your agent to find the library calendar among your tabs and compare its answer with the title in the browser. Fricle’s Model Context Protocol (MCP) server uses Streamable HTTP on the loopback address, 127.0.0.1.

Example · Find the library calendar from a project terminal

In the project terminal, run frc skill install --folder .agents/skills to install the Fricle skill for the project. Find the address of Fricle’s MCP server. In your Codex configuration, add that URL under [mcp_servers.fricle] as shown in Configure the client.

Run codex mcp login fricle --no-browser, open the authorization link in Fricle, and approve the local connection. Then check it with codex mcp list. Open the library class calendar, then read the open tabs through the authenticated Codex client. The recording uses the client’s app-server to call Fricle’s tab.list action. Its title Weekend cooking classes matches the page beside the terminal.

The terminal lists Weekend cooking classes alongside the open library calendar.

Install the Fricle skill

The Fricle skill gives a coding agent instructions for using Fricle. Install it for the agent on the device that runs the agent. The skill file and the MCP connection are separate parts of setup.

Example · Give your coding agent access to your Fricle tabs

  1. Open a terminal on the device running Fricle and run frc skill status. Find your agent’s folder in the JSON output.

  2. Install the skill for the agent you use. For Codex, run the command below. For Claude Code, use .claude/skills in place of .agents/skills. Run the status command again and check that the entry for that folder reads current. The installed file is fricle/SKILL.md inside that folder.

    sh
    frc skill install --folder .agents/skills
    frc skill status
    
  3. In Fricle, find the MCP server address. Register the server with the same agent and authorize its connection. Keep the Fricle window open.

  4. Open a recognizable page in Fricle and start a fresh session with your agent. Ask “Use the Fricle skill to list my open tabs and tell me which tab is selected.” Compare the reported title with your browser. Discover and call a tool shows the underlying action and response.

Find the server address

  1. In Fricle, check Settings → AI features → Model Context Protocol → MCP Server. If you change the setting, restart Fricle. Keep Fricle open while using the MCP client.

  2. Use the address for your running app. The default is http://127.0.0.1:47821/mcp for Fricle and http://127.0.0.1:47822/mcp for Fricle(Dev). If Fricle is using a different port, take the url value from the Fricle profile’s mcp/connection.json.

MCP Server in AI features settings

Configure the client

On the device running Fricle, add the following table to your Codex user configuration in ~/.codex/config.toml. Substitute your address if it differs from the default. Codex configuration example

toml
[mcp_servers.fricle]
url = "http://127.0.0.1:47821/mcp"

You can also register the server from the Codex CLI.

sh
codex mcp add fricle --url http://127.0.0.1:47821/mcp

For Claude Code, register the server from the project where you’ll use it. Claude Code MCP documentation

sh
claude mcp add --transport http fricle http://127.0.0.1:47821/mcp

Authorize a connection

In Codex, run the following commands after registering the address of the running Fricle instance. Complete the local authorization flow. In the list, find fricle, check that the connection is enabled, and look for OAuth in the Auth column. You can also inspect the authorized client in Fricle’s Model Context Protocol settings.

sh
codex mcp login fricle
codex mcp list

If you need to choose where the local sign-in link opens, check codex mcp login --help for --no-browser. Codex 0.170.0 can print the authorization link, then accept the callback URL in the same terminal. Open the link on the device running Fricle and return the callback to that Codex prompt. The callback contains a temporary authorization code.

In an interactive Claude Code session, run /mcp, choose fricle, and follow the authentication prompts. Use the agent’s existing sign-in for the model itself. Run a project coding agent.

To check the connection in use, bring the class calendar to the front and ask your agent to run tab.list. If it asks permission, inspect the tool name and the requested action. A noninteractive client can report enabled / OAuth and still decline a tool call that needs approval. Once the call succeeds, compare the returned title with the selected tab. Read a port notice with MCP.

Discover and call a tool

Fricle exposes two MCP tools. Use info to discover Fricle actions and their arguments. Use call with an action name to run it. For example, window.list lists windows, tab.list lists tabs, and tab.snapshot reads the text and elements in a tab. Fricle can ask for approval before running an action. The action can be blocked if the client cannot show the approval request.

Example: List open tabs from an MCP client

  1. Open a tab you can recognize in Fricle, then start a session in the authorized MCP client.

  2. Ask “Use Fricle to list my open tabs and tell me which one is current.” Compare the title in the reply with the tab selected in Fricle. tab.list is read-only and returns current: true for the current tab.

For client developers, this is the JSON-RPC request that calls tab.list in an established session.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "call",
    "arguments": {
      "name": "tab.list",
      "arguments": {}
    }
  }
}

An example success response with one web tab is below. Read the tab list from result.structuredContent.tabs. The same data appears as text in result.content.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "<untrusted_content source=\"tab.list\" origin=\"local\">\n{\"tabs\":[{\"tab\":\"example-tab\",\"title\":\"Example Domain\",\"kind\":\"web\",\"app\":\"browser\",\"url\":\"https://example.com/\",\"current\":true,\"window\":\"window-1\",\"group\":\"group-1\"}]}\n</untrusted_content>"
      }
    ],
    "structuredContent": {
      "tabs": [
        {
          "tab": "example-tab",
          "title": "Example Domain",
          "kind": "web",
          "app": "browser",
          "url": "https://example.com/",
          "current": true,
          "window": "window-1",
          "group": "group-1"
        }
      ]
    },
    "isError": false
  }
}

Example: Fill a local form and check its result

  1. In an empty test folder, save the following as index.html. Serve the folder locally with python3 -m http.server 8765 --bind 127.0.0.1 and open http://127.0.0.1:8765/ in Fricle. This form only changes its own page.

    html
    <label>Project <input id="project"></label>
    <button onclick="document.querySelector('output').textContent = document.querySelector('#project').value">Preview</button>
    <output></output>
    
  2. Use the MCP tool call with {"name":"tab.snapshot","arguments":{"tab":"<tab ID>"}} after finding the local page with tab.list. Find the current refs for the sample form’s Project field and Preview button in structuredContent.elements. The refs below are examples. Use the returned values for your page.

  3. Call tab.act twice using the same tab ID. Set do to fill with a string value for the field, then click the Preview ref. Review any approval your MCP client displays.

    json
    {"name":"tab.act","arguments":{"tab":"<tab ID>","ref":"e1","do":"fill","value":"Demo project"}}
    
    json
    {"name":"tab.act","arguments":{"tab":"<tab ID>","ref":"e2","do":"click"}}
    
  4. Take another tab.snapshot and check that the page text includes “Demo project.” Take a new snapshot whenever the page changes and the previous refs stop working.

The test form shows the value entered through MCP

Discover app commands

Call app.list to discover Fricle apps. Pass {"names":["app.fricle"]} to the MCP tool info to discover Fricle’s window commands. For another app, substitute its name from app.list, then use info again for the arguments before calling a specific action.

Choose between the app and Fricle Host MCP

Use the running Fricle app’s HTTP MCP server for browser tabs, their page content, and app commands. Use the standard-input/output command frc mcp with an MCP client when you only need Fricle Host tasks such as files, terminals, or processes. Run frc info --json to inspect the Fricle Host MCP catalog. A CLI agent can use the app MCP connection described above for browser work, and can run frc directly for Fricle Host commands when its environment and permissions allow it.

Disconnect

In Settings → AI features → Model Context Protocol → Connected clients, find the client and select Disconnect to revoke its access.

The authorized sample client and its Disconnect button