# FavStash AI Connect — agent router

This file is a router. FavStash is a hosted Streamable HTTP MCP server for
searching saved Instagram, TikTok, YouTube, and LinkedIn inspiration, analyzing
connected social accounts, and planning or publishing content. Do not build or
download a local MCP server for ordinary HTTPS-based workflows when the host
can connect remotely. Local-file publishing is the separate bridge case below.

Hosted endpoint:

```text
https://mcp.favstash.app/mcp
```

## Route to the exact host guide

1. Identify the app or agent running this request. If the user's install prompt
   names the host, use that name without asking again.
2. Open exactly one matching guide below and follow the selected setup shown at
   the top of that page.
3. If the host is not listed, use **Other CLI / MCP client** only after checking
   that host's MCP help or settings.

| Detected host                                | Exact setup guide                                                            |
| -------------------------------------------- | ---------------------------------------------------------------------------- |
| Codex desktop app, CLI, or IDE extension     | <https://www.favstash.app/docs/ai-connect?agent=codex#agentic-setup>         |
| ChatGPT Web, Chat, or Work                   | <https://www.favstash.app/docs/ai-connect?agent=chatgpt#agentic-setup>       |
| Claude Web, Desktop, Chat, mobile, or Cowork | <https://www.favstash.app/docs/ai-connect?agent=claude-hosted#agentic-setup> |
| Claude Code                                  | <https://www.favstash.app/docs/ai-connect?agent=claude-code#agentic-setup>   |
| Cursor                                       | <https://www.favstash.app/docs/ai-connect?agent=cursor#agentic-setup>        |
| Windsurf / Cascade                           | <https://www.favstash.app/docs/ai-connect?agent=windsurf#agentic-setup>      |
| Hermes Agent                                 | <https://www.favstash.app/docs/ai-connect?agent=hermes#agentic-setup>        |
| OpenClaw                                     | <https://www.favstash.app/docs/ai-connect?agent=openclaw#agentic-setup>      |
| Another CLI or MCP client                    | <https://www.favstash.app/docs/ai-connect?agent=other-cli#agentic-setup>     |

Do not send every guide to the user. Route first, then use the one matching
guide.

## Installation authority and permissions

The user's one-line install request grants narrow authority to add or update
only the `favstash` MCP connection. It does not authorize unrelated config
changes.

- Prefer the host's built-in MCP command or settings UI over editing a config
  file by hand. This avoids guessing Windows, macOS, Linux, or WSL paths.
- Check the installed host's capabilities before declaring it unsupported. For
  example, local Codex should check `codex mcp --help`; it does not need a
  FavStash plugin or connector package to add this remote server.
- If the host blocks a required config write, request narrowly scoped approval
  to run its MCP add command or update its MCP config. Explain the exact file or
  command before requesting access.
- If this session cannot request approval, cannot access the user's local
  machine, or is running in a cloud-only environment, give the exact command or
  settings from the routed guide and say that local completion is required. Do
  not turn a session-level permission limit into the false claim that the host
  cannot use MCP.
- Preserve existing MCP entries. Never overwrite a whole config file to add one
  server.

## Authentication and secret handling

Use OAuth whenever the routed guide supports it. FavStash's OAuth flow opens a
browser for sign-in and approval; it does not require an OAuth client ID,
client secret, or FavStash API key from the user.

An API key is required by the separate local-file bridge, and is an advanced
fallback for a client or installed version that cannot complete remote MCP OAuth:

1. Ask the user to create a key at **FavStash → Dashboard → AI Connection**.
2. Ask them to store it in the host's local environment or secret manager under
   `FAVSTASH_API_KEY`; do not ask them to paste the key into chat.
3. Configure the host to read that variable and send
   `Authorization: Bearer <value>` to the hosted endpoint.

FavStash keys start with `favstash_pk_`. Never commit, log, print, or echo one.
Never request an Instagram, TikTok, YouTube, LinkedIn, Google, or other
social-provider password or token; those connections happen inside FavStash.

## Verification contract

Do not report success immediately after changing configuration.

1. Use the host's MCP `get`, `list`, `status`, or equivalent to confirm the
   `favstash` entry exists.
2. Complete OAuth if required, then restart or reload the app, extension, or
   agent session as directed by the routed guide.
3. Confirm FavStash tools are present.
4. Make a real read-only call, for example:

```text
Use FavStash to list my collections and summarize items I saved in the last 7 days.
```

If the host can save the connection but cannot restart itself, tell the user
exactly what to restart and describe setup as **configured, awaiting restart**.

## Publishing local media

The hosted generic MCP profile currently imports publishing media from an HTTPS
URL. It cannot read a local filesystem path. ChatGPT's dedicated profile can
translate ChatGPT-native attachments, but that does not make attachment input a
generic MCP capability.

For a filesystem-capable host, local publishing requires the separately
distributed `@sketric/favstash-mcp` stdio bridge. Public npm publication of
version 0.3.0 is pending; do not claim an `npx` installation succeeded before
the package is available. Use hosted HTTPS media or ChatGPT attachments in
the meantime. After installing the bridge, its `create_social_post` and
`update_social_post` tools accept absolute `media[].localPath` and
`media[].thumbnailPath` values and hide validation, upload, multipart retry, and
CDN substitution inside the same tool call. The bridge rejects invalid typed
provider settings before reading or uploading local files, and FavStash verifies
the stored bytes before returning a content-addressed CDN URL. A remote
OAuth-only connection still requires an HTTPS URL unless its host supplies a
supported attachment.

Do not read or expose the MCP bearer credential, call FavStash's REST upload
routes directly, open the web composer, or use unrelated AWS credentials as an
upload workaround.

## Reference and troubleshooting

- Product and agent overview: <https://www.favstash.app/llms.txt>
- MCP tools: <https://www.favstash.app/docs/tools-reference>
- Public health probe: <https://mcp.favstash.app/health>

The `@sketric/favstash-mcp` stdio bridge is for older command-only clients and
for filesystem-capable agents that need local-media publishing. HTTP-capable
clients using existing HTTPS media should use the hosted endpoint directly.
