Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion es/tools/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Elige una de dos rutas:

1. **Crea una app de X** con **OAuth 2.0** habilitado.
2. **Registra la URI de redirección** `http://localhost:8080/callback` en la app (requerida para el inicio de sesión por navegador en la primera ejecución). Para usar otra, define `REDIRECT_URI` y registra esa en su lugar.
3. **Copia tu `CLIENT_ID` y `CLIENT_SECRET`** — los colocarás en la configuración del cliente.
3. **Copia tu `CLIENT_ID` y `CLIENT_SECRET`** — los colocarás en la configuración del cliente. Si alguna vez ejecutas `xurl auth oauth2` manualmente (por ejemplo, el flujo headless de más abajo), expórtalos como variables de entorno en esa shell primero — el inicio de sesión falla en el navegador sin ellos.
4. **Ten Node.js instalado** (para `npx`).
5. Recomendamos que **instales [xurl](https://github.com/xdevplatform/xurl)**:

Expand Down Expand Up @@ -270,6 +270,11 @@ El handshake de MCP se mantiene en espera hasta que termines — por eso los cli
¿No hay un navegador accesible? Autentícate una vez fuera de banda y luego inicia el cliente:

```bash
# Requerido: el bloque env en la configuración de tu cliente solo se aplica al puente,
# no a las ejecuciones manuales de xurl — exporta las credenciales en esta shell primero.
export CLIENT_ID="YOUR_X_APP_CLIENT_ID"
export CLIENT_SECRET="YOUR_X_APP_CLIENT_SECRET"

xurl auth oauth2 --headless # prints an auth URL; you paste back the redirect URL/code
xurl auth oauth2 --app my-app --headless # for a specific app
```
Expand All @@ -292,6 +297,10 @@ Contrapartida: sin auto-refresh y sin contexto de usuario (sin acciones como tú

#### Múltiples apps y cuentas

<Note>
El inicio de sesión OAuth autoriza **la cuenta de X que tengas iniciada cuando se abra el navegador** — no necesariamente la cuenta propietaria de la app. Si vas a publicar en nombre de una cuenta secundaria o bot, cambia a esa cuenta en el navegador antes de completar el inicio de sesión (o usa `-u` para elegir un usuario previamente autorizado).
</Note>

```bash
xurl --app my-app mcp # bridge using a specific registered app
xurl mcp -u alice https://api.x.com/mcp # act as a specific OAuth2 user
Expand Down Expand Up @@ -325,6 +334,7 @@ npx -y @xdevplatform/xurl mcp https://api.x.com/mcp
| El cliente excede el tiempo de espera al arrancar | Aumenta `startup_timeout_sec` a 300+; el puente está esperando tu inicio de sesión en el navegador |
| El navegador nunca se abre | Sin display (headless) → ejecuta primero `xurl auth oauth2 --headless`; asegúrate de que `npx` se resuelva |
| `401` / `token refresh failed` | Credenciales de la app incorrectas, o refresh token revocado → vuelve a ejecutar el inicio de sesión (`xurl auth oauth2 [--app NAME]`) |
| El navegador muestra "Something went wrong — You weren't able to give access to the App" | `CLIENT_ID`/`CLIENT_SECRET` no están definidos donde se ejecuta `xurl` → agrégalos al bloque `env` del cliente, o haz `export` en tu shell antes de ejecutar `xurl auth oauth2` manualmente |
| Error de redirect/callback en el navegador | `http://localhost:8080/callback` no está registrado en la app (o `REDIRECT_URI` no coincide) |
| `client-not-enrolled` después de iniciar sesión | La app no está en el paquete/entorno correcto de X → en el portal muévela a **Pay-per-use** + **Production** |
| `npx` descarga una versión obsoleta | Hay un mirror de registro privado por defecto → fija `--registry=https://registry.npmjs.org/` en `args` |
Expand Down
12 changes: 11 additions & 1 deletion ja/tools/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ flowchart LR

1. **OAuth 2.0** を有効にした **X アプリを作成** します。
2. アプリにリダイレクト URI `http://localhost:8080/callback` を **登録** します(初回のブラウザログインに必要)。別のものを使う場合は、`REDIRECT_URI` を設定し、そちらを登録してください。
3. **`CLIENT_ID` と `CLIENT_SECRET` をコピー** します — これらをクライアント設定に記述します。
3. **`CLIENT_ID` と `CLIENT_SECRET` をコピー** します — これらをクライアント設定に記述します。`xurl auth oauth2` を手動で実行する場合(下記のヘッドレスフローなど)は、事前にそのシェルで環境変数としてエクスポートしておいてください — 設定しないままだとブラウザでのログインが失敗します。
4. **Node.js がインストール済み** であること(`npx` 用)。
5. **[xurl](https://github.com/xdevplatform/xurl) のインストール** を推奨します:

Expand Down Expand Up @@ -270,6 +270,11 @@ MCP のハンドシェイクは完了するまで保留されます — これ
ブラウザが利用できない場合は、一度アウトオブバンドで認証してからクライアントを起動します:

```bash
# 必須: クライアント設定の env ブロックはブリッジにのみ適用され、
# 手動の xurl 実行には適用されません — このシェルで先に認証情報をエクスポートしてください。
export CLIENT_ID="YOUR_X_APP_CLIENT_ID"
export CLIENT_SECRET="YOUR_X_APP_CLIENT_SECRET"

xurl auth oauth2 --headless # prints an auth URL; you paste back the redirect URL/code
xurl auth oauth2 --app my-app --headless # for a specific app
```
Expand All @@ -292,6 +297,10 @@ Authorization = "Bearer YOUR_APP_ONLY_BEARER_TOKEN"

#### 複数のアプリとアカウント

<Note>
OAuth ログインでは、**ブラウザを開いたときにログインしている X アカウント** が認可されます — 必ずしもアプリの所有アカウントとは限りません。サブアカウントや Bot アカウントとしてポストしたい場合は、ログインを完了する前にブラウザ側でそのアカウントに切り替えてください(あるいは、以前に認可済みのユーザーを選ぶために `-u` を使ってください)。
</Note>

```bash
xurl --app my-app mcp # bridge using a specific registered app
xurl mcp -u alice https://api.x.com/mcp # act as a specific OAuth2 user
Expand Down Expand Up @@ -325,6 +334,7 @@ npx -y @xdevplatform/xurl mcp https://api.x.com/mcp
| クライアントが起動時にタイムアウトする | `startup_timeout_sec` を 300 以上に上げる。ブリッジはブラウザログインを待っています |
| ブラウザが開かない | ディスプレイがない(ヘッドレス) → まず `xurl auth oauth2 --headless` を実行。`npx` が解決できることを確認 |
| `401` / `token refresh failed` | アプリの資格情報が誤っているか、リフレッシュトークンが失効 → ログインを再実行(`xurl auth oauth2 [--app NAME]`) |
| ブラウザに "Something went wrong — You weren't able to give access to the App" と表示される | `xurl` の実行環境で `CLIENT_ID`/`CLIENT_SECRET` が設定されていない → クライアントの `env` ブロックに記述するか、`xurl auth oauth2` を手動で実行する前にシェルで `export` してください |
| ブラウザでリダイレクト/コールバックエラー | `http://localhost:8080/callback` がアプリに登録されていない(または `REDIRECT_URI` が不一致) |
| ログイン後に `client-not-enrolled` | アプリが適切な X パッケージ/環境にない → ポータルで **Pay-per-use** + **Production** に移動 |
| `npx` が古いバージョンを取得する | プライベートレジストリミラーがデフォルトになっている → `args` に `--registry=https://registry.npmjs.org/` を固定する |
Expand Down
12 changes: 11 additions & 1 deletion ko/tools/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ flowchart LR

1. **OAuth 2.0**이 활성화된 **X 앱을 생성**합니다.
2. 첫 실행 시 브라우저 로그인에 필요한 **리다이렉트 URI** `http://localhost:8080/callback`을 앱에 등록합니다. 다른 URI를 사용하려면 `REDIRECT_URI`를 설정하고 해당 URI를 등록하세요.
3. **`CLIENT_ID`와 `CLIENT_SECRET`을 복사**해 두세요 — 클라이언트 설정에 입력해야 합니다.
3. **`CLIENT_ID`와 `CLIENT_SECRET`을 복사**해 두세요 — 클라이언트 설정에 입력해야 합니다. `xurl auth oauth2`를 수동으로 실행할 일이 있다면(예: 아래의 헤드리스 흐름), 해당 셸에서 먼저 환경 변수로 내보내세요 — 그렇지 않으면 브라우저 로그인이 실패합니다.
4. **Node.js를 설치**해 두세요 (`npx`에 필요).
5. **[xurl](https://github.com/xdevplatform/xurl) 설치**를 권장합니다:

Expand Down Expand Up @@ -270,6 +270,11 @@ MCP 핸드셰이크는 로그인이 완료될 때까지 보류됩니다 — 그
접근 가능한 브라우저가 없나요? 한 번 별도로 인증한 후 클라이언트를 시작하세요:

```bash
# 필수: 클라이언트 설정의 env 블록은 브리지에만 적용되며,
# 수동 xurl 실행에는 적용되지 않습니다 — 이 셸에서 먼저 자격 증명을 내보내세요.
export CLIENT_ID="YOUR_X_APP_CLIENT_ID"
export CLIENT_SECRET="YOUR_X_APP_CLIENT_SECRET"

xurl auth oauth2 --headless # prints an auth URL; you paste back the redirect URL/code
xurl auth oauth2 --app my-app --headless # for a specific app
```
Expand All @@ -292,6 +297,10 @@ Authorization = "Bearer YOUR_APP_ONLY_BEARER_TOKEN"

#### 여러 앱과 계정

<Note>
OAuth 로그인은 **브라우저가 열릴 때 로그인되어 있는 X 계정**을 인가합니다 — 반드시 앱을 소유한 계정이 아닙니다. 보조/봇 계정으로 게시하려면 로그인을 완료하기 전에 브라우저에서 해당 계정으로 전환하세요(또는 이미 인가된 사용자를 선택하려면 `-u`를 사용하세요).
</Note>

```bash
xurl --app my-app mcp # bridge using a specific registered app
xurl mcp -u alice https://api.x.com/mcp # act as a specific OAuth2 user
Expand Down Expand Up @@ -325,6 +334,7 @@ npx -y @xdevplatform/xurl mcp https://api.x.com/mcp
| 시작 시 클라이언트 타임아웃 | `startup_timeout_sec`를 300 이상으로 올리세요; 브리지가 브라우저 로그인을 대기 중입니다 |
| 브라우저가 열리지 않음 | 디스플레이 없음(헤드리스) → 먼저 `xurl auth oauth2 --headless`를 실행; `npx`가 해석되는지 확인 |
| `401` / `token refresh failed` | 앱 자격 증명이 잘못되었거나 리프레시 토큰이 폐기됨 → 다시 로그인(`xurl auth oauth2 [--app NAME]`) |
| 브라우저에 "Something went wrong — You weren't able to give access to the App"가 표시됨 | `xurl`이 실행되는 위치에 `CLIENT_ID`/`CLIENT_SECRET`가 설정되지 않음 → 클라이언트의 `env` 블록에 넣거나, `xurl auth oauth2`를 수동으로 실행하기 전에 셸에서 `export`하세요 |
| 브라우저에서 리다이렉트/콜백 오류 | `http://localhost:8080/callback`이 앱에 등록되지 않음(또는 `REDIRECT_URI` 불일치) |
| 로그인 후 `client-not-enrolled` | 앱이 올바른 X 패키지/환경에 없음 → 포털에서 **Pay-per-use** + **Production**으로 이동 |
| `npx`가 오래된 버전을 가져옴 | 프라이빗 레지스트리 미러가 기본값 → `args`에 `--registry=https://registry.npmjs.org/` 고정 |
Expand Down
12 changes: 11 additions & 1 deletion pt/tools/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Escolha um dos dois caminhos:

1. **Crie um app X** com **OAuth 2.0** habilitado.
2. **Registre o redirect URI** `http://localhost:8080/callback` no app (necessário para o login pelo navegador na primeira execução). Para usar outro, defina `REDIRECT_URI` e registre esse no lugar.
3. **Copie seu `CLIENT_ID` e `CLIENT_SECRET`** — você os colocará na configuração do cliente.
3. **Copie seu `CLIENT_ID` e `CLIENT_SECRET`** — você os colocará na configuração do cliente. Se em algum momento você executar `xurl auth oauth2` manualmente (por exemplo, no fluxo headless abaixo), exporte-os como variáveis de ambiente naquela shell primeiro — sem eles, o login falha no navegador.
4. **Tenha o Node.js instalado** (para o `npx`).
5. Recomendamos que você **instale o [xurl](https://github.com/xdevplatform/xurl)**:

Expand Down Expand Up @@ -270,6 +270,11 @@ O handshake do MCP fica em espera até você concluir — por isso os clientes p
Sem navegador acessível? Autentique-se uma vez fora de banda e depois inicie o cliente:

```bash
# Obrigatório: o bloco env na configuração do seu cliente só se aplica à ponte,
# não a execuções manuais do xurl — exporte as credenciais nesta shell primeiro.
export CLIENT_ID="YOUR_X_APP_CLIENT_ID"
export CLIENT_SECRET="YOUR_X_APP_CLIENT_SECRET"

xurl auth oauth2 --headless # prints an auth URL; you paste back the redirect URL/code
xurl auth oauth2 --app my-app --headless # for a specific app
```
Expand All @@ -292,6 +297,10 @@ Contrapartida: sem auto-refresh e sem contexto de usuário (sem ações em seu n

#### Múltiplos apps e contas

<Note>
O login OAuth autoriza **qualquer conta X que estiver logada quando o navegador abrir** — não necessariamente a conta que é dona do app. Se você está postando em nome de uma conta secundária/bot, troque para essa conta no seu navegador antes de concluir o login (ou use `-u` para escolher um usuário previamente autorizado).
</Note>

```bash
xurl --app my-app mcp # bridge using a specific registered app
xurl mcp -u alice https://api.x.com/mcp # act as a specific OAuth2 user
Expand Down Expand Up @@ -325,6 +334,7 @@ npx -y @xdevplatform/xurl mcp https://api.x.com/mcp
| Cliente expira na inicialização | Aumente `startup_timeout_sec` para 300+; a ponte está esperando seu login pelo navegador |
| Navegador nunca abre | Sem display (headless) → execute `xurl auth oauth2 --headless` primeiro; garanta que `npx` resolva |
| `401` / `token refresh failed` | Credenciais do app erradas, ou refresh token revogado → refaça o login (`xurl auth oauth2 [--app NAME]`) |
| Navegador mostra "Something went wrong — You weren't able to give access to the App" | `CLIENT_ID`/`CLIENT_SECRET` não definidos onde o `xurl` é executado → coloque-os no bloco `env` do cliente, ou use `export` para defini-los na sua shell antes de executar `xurl auth oauth2` manualmente |
| Erro de redirect/callback no navegador | `http://localhost:8080/callback` não registrado no app (ou `REDIRECT_URI` divergente) |
| `client-not-enrolled` após login | O app não está no pacote/ambiente X correto → no portal, mova-o para **Pay-per-use** + **Production** |
| `npx` puxa uma versão antiga | Um mirror de registry privado está como padrão → fixe `--registry=https://registry.npmjs.org/` em `args` |
Expand Down