Skip to content

Commit ccb5afa

Browse files
committed
Update README: use agentframework_http.py for Keycloak testing
1 parent bf6ec60 commit ccb5afa

File tree

1 file changed

+10
-36
lines changed

1 file changed

+10
-36
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -284,19 +284,6 @@ When using VNet configuration, additional Azure resources are provisioned:
284284

285285
This project supports deploying with OAuth 2.0 authentication using Keycloak as the identity provider, implementing the [MCP OAuth specification](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization) with Dynamic Client Registration (DCR).
286286

287-
### Architecture
288-
289-
```text
290-
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” 1. DCR + Token β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
291-
β”‚ LangChain β”‚ ──────────────────────► β”‚ Keycloak β”‚
292-
β”‚ Agent β”‚ ◄────────────────────── β”‚ (direct) β”‚
293-
β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
294-
β”‚ β”‚ 2. MCP + Bearer
295-
β”‚ β”‚ ──────────────────────► β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
296-
β”‚ β”‚ ◄────────────────────── β”‚ mcproutes β”‚ β†’ MCP Server
297-
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
298-
```
299-
300287
### What gets deployed
301288

302289
| Component | Description |
@@ -343,7 +330,7 @@ This project supports deploying with OAuth 2.0 authentication using Keycloak as
343330

344331
Login with `admin` and your configured password.
345332

346-
### Testing with the LangChain agent
333+
### Testing with the agent
347334

348335
1. Generate the local environment file:
349336

@@ -356,33 +343,20 @@ This project supports deploying with OAuth 2.0 authentication using Keycloak as
356343
2. Run the agent:
357344

358345
```bash
359-
uv run agents/langchainv1_keycloak.py
346+
uv run agents/agentframework_http.py
360347
```
361348

349+
The agent automatically detects `KEYCLOAK_REALM_URL` in the environment and authenticates via DCR + client credentials.
350+
362351
Expected output:
363352

364353
```text
365-
============================================================
366-
LangChain Agent with Keycloak-Protected MCP Server
367-
============================================================
368-
369-
Configuration:
370-
MCP Server: https://mcproutes.<env>.azurecontainerapps.io/mcp
371-
Keycloak: https://mcp-<name>-kc.<env>.azurecontainerapps.io/realms/mcp
372-
LLM Host: azure
373-
Auth: Dynamic Client Registration (DCR)
374-
375-
[11:40:48] INFO πŸ“ Registering client via DCR...
376-
INFO βœ… Registered client: caef6f47-0243-474d-b...
377-
INFO πŸ”‘ Getting access token from Keycloak...
378-
INFO βœ… Got access token (expires in 300s)
379-
INFO πŸ“‘ Connecting to MCP server...
380-
INFO πŸ”§ Getting available tools...
381-
INFO βœ… Found 1 tools: ['add_expense']
382-
INFO πŸ’¬ User query: Add an expense: yesterday I bought a laptop...
383-
...
384-
INFO πŸ“Š Agent Response:
385-
The expense of $1200 for the laptop purchase has been successfully recorded.
354+
INFO πŸ” Auth enabled - connecting to https://mcproutes.<env>.azurecontainerapps.io/mcp with Bearer token
355+
INFO πŸ“ Registering client via DCR...
356+
INFO βœ… Registered client: agentframework-20251205-...
357+
INFO πŸ”‘ Getting access token from Keycloak...
358+
INFO βœ… Got access token (expires in 300s)
359+
The expense of $1200.0 for 'laptop' on 2025-12-04 has been successfully added.
386360
```
387361

388362
### Known limitations (demo trade-offs)

0 commit comments

Comments
Β (0)