From ac52a725573264f1ad342876ceadd28d4834c8b4 Mon Sep 17 00:00:00 2001 From: Glen Maddern Date: Wed, 2 Jul 2025 16:24:53 +1000 Subject: [PATCH] Updated readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 20eebaa..704831c 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ import { useMcp } from 'use-mcp/react' function MyAIComponent() { const { - state, // Connection state: 'discovering' | 'authenticating' | 'connecting' | 'loading' | 'ready' | 'failed' + state, // Connection state: 'discovering' | 'pending_auth' | 'authenticating' | 'connecting' | 'loading' | 'ready' | 'failed' tools, // Available tools from MCP server error, // Error message if connection failed callTool, // Function to call tools on the MCP server @@ -168,12 +168,13 @@ function useMcp(options: UseMcpOptions): UseMcpResult | `autoRetry` | `boolean \| number` | Auto retry connection if initial connection fails, with delay in ms | | `autoReconnect` | `boolean \| number` | Auto reconnect if an established connection is lost, with delay in ms (default: 3000) | | `transportType` | `'auto' \| 'http' \| 'sse'` | Transport type preference: 'auto' (HTTP with SSE fallback), 'http' (HTTP only), 'sse' (SSE only) (default: 'auto') | +| `preventAutoAuth` | `boolean` | Prevent automatic authentication popup on initial connection (default: false) | #### Return Value | Property | Type | Description | |----------|------|-------------| -| `state` | `string` | Current connection state: 'discovering', 'authenticating', 'connecting', 'loading', 'ready', 'failed' | +| `state` | `string` | Current connection state: 'discovering', 'pending_auth', 'authenticating', 'connecting', 'loading', 'ready', 'failed' | | `tools` | `Tool[]` | Available tools from the MCP server | | `error` | `string \| undefined` | Error message if connection failed | | `authUrl` | `string \| undefined` | Manual authentication URL if popup is blocked |