---
title: "Connect your agent"
description: "smabar has an MCP server on localhost. Connect Claude Code, Codex or any MCP client and it can build widgets for you."
canonical: "https://smabar.com/docs/connect-your-agent/"
lang: en
---

# Connect your agent

> smabar has an MCP server on localhost. Connect Claude Code, Codex or any MCP client and it can build widgets for you.

Canonical HTML version: https://smabar.com/docs/connect-your-agent/ · Language: en · Publisher: smabar (https://smabar.com)

---

smabar runs an MCP server on your own machine. Any agent that speaks MCP over streamable HTTP can connect to it and then read the plugin guide, write plugin files, take screenshots of the bar and read its logs. Nothing about this leaves your computer: the server listens on `127.0.0.1` only.

The endpoint with the default settings is:

```text
http://127.0.0.1:7627/mcp
```

Settings › System shows the live endpoint and copyable setup snippets for each agent. The port and the on/off switch live in `~/.smabar/config.json` under `mcp`.

## Claude Code

```sh
claude mcp add --transport http smabar http://127.0.0.1:7627/mcp
```

Or, to keep it with a project, in that project's `.mcp.json`:

```json
{
  "mcpServers": {
    "smabar": { "type": "http", "url": "http://127.0.0.1:7627/mcp" }
  }
}
```

## Codex

```sh
codex mcp add smabar --url http://127.0.0.1:7627/mcp
```

Which writes this into `~/.codex/config.toml`:

```toml
[mcp_servers.smabar]
url = "http://127.0.0.1:7627/mcp"
```

## Other clients

Grok Build, Google Antigravity and every other client that supports streamable HTTP MCP servers take the same URL. Look for "add MCP server", choose the HTTP transport, paste the endpoint, and give it the name `smabar`.

## The first prompt

Once connected, tell the agent what you want on the bar. A good first prompt names the outcome, not the code:

> Build me a Pomodoro widget: start, pause and reset in the flyout, the remaining time on the tile, a notification when a session ends.

The agent will call the guide tool first, write the plugin into `~/.smabar/plugins/`, watch the bar pick it up, take a screenshot to check the result and read the plugin's log if anything is off. The next page explains what to ask for and what to expect: [Ask for a widget](https://smabar.com/docs/ask-for-a-widget/).
