Skip to content

Commit d2d2863

Browse files
committed
Update examples
1 parent c6fc36c commit d2d2863

File tree

8 files changed

+1724
-65
lines changed

8 files changed

+1724
-65
lines changed

src/examples/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,24 @@ A server that demonstrates server notifications using Streamable HTTP.
105105
npx tsx src/examples/server/standaloneSseWithGetStreamableHttp.ts
106106
```
107107

108+
##### Elicitation Example
109+
110+
A comprehensive example demonstrating URL mode elicitation with a server protected by MCP authorization. This example shows:
111+
112+
- SSE-driven URL-mode elicitation of an API Key on session initialization
113+
- Tools that require direct user interaction via URL-mode elicitation (for payment confirmation and for third-party OAuth tokens)
114+
- Completion notifications for URL-mode elicitations
115+
116+
To run this example:
117+
118+
```bash
119+
# Start the server with OAuth enabled
120+
npx tsx src/examples/server/elicitationStreamableHttp.ts
121+
122+
# In a separate terminal, start the client with OAuth
123+
npx tsx src/examples/client/elicitationStreamableHttp.ts
124+
```
125+
108126
#### Deprecated SSE Transport
109127

110128
A server that implements the deprecated HTTP+SSE transport (protocol version 2024-11-05). This example only used for testing backwards compatibility for clients.

0 commit comments

Comments
 (0)