# Connect your AI agent

Connect an agent on this PC, a cloud agent, or an advanced command bridge with the right address and a separate key.

Source: https://muse4ai.lovable.app/docs/connect-overview · Updated 2026-11-02

## Before you start

- Keep the app open on your Windows PC and sign in to Muse.
- Find out whether the agent runs on this PC or in the cloud.

## 1. Enable access and create a key

Open Settings › API & agent. Enable API for agents and create a key named for this agent. Copy the key before closing its dialog.

## 2. For an agent on this PC

Add an HTTP MCP server using http://127.0.0.1:47821/mcp and your key. Use the app’s current address if you changed its port. See [Claude Code](https://muse4ai.lovable.app/agents/claude-code), [Cursor](https://muse4ai.lovable.app/agents/cursor), or [Codex](https://muse4ai.lovable.app/agents/codex).

```text
MCP URL: http://127.0.0.1:47821/mcp
Authorization: Bearer msk_YOUR_KEY
```

## 3. For a cloud agent

A cloud agent cannot reach this PC’s local address. Set up [Remote access](https://muse4ai.lovable.app/docs/remote-access), then use the public MCP address and a key. See [Claude](https://muse4ai.lovable.app/agents/claude) or [Lovable](https://muse4ai.lovable.app/agents/lovable).

## 4. For local-command-only apps

An advanced bridge runs a local command and forwards requests to the HTTP MCP server. Use the configuration in the agent’s guide rather than guessing a command. Browse [all agent guides](https://muse4ai.lovable.app/agents). ChatGPT is not supported yet because OAuth sign-in support is needed.

## 5. Test before creating media

Ask the agent to call muse_status first. Confirm it can see the app’s status before asking it to create an image or video.

## Check it worked

The agent can read the app’s status using its own key and the correct local or public address.

## If it doesn't work

### Why does the local URL fail in a cloud app?

A local address points to the computer making the request. Give a cloud agent the public address from Remote access instead.

### Why does the agent say unauthorized?

Check that the key is active and sent as a Bearer authorization header. A public address does not replace the key.
