Skip to content

Commit 3d471a7

Browse files
committed
Fix formatting and additional prod verification steps
Signed-off-by: Andrew Block <andy.block@gmail.com>
1 parent 817b7a8 commit 3d471a7

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

_posts/2025-04-28-secure-mcp-sse-server.adoc

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,16 @@ Launch https://modelcontextprotocol.io/docs/tools/inspector[MCP inspector]:
315315
npx @modelcontextprotocol/inspector
316316
----
317317

318-
Paste the copied GitHub access token to the `Bearer Token` field and connect to the Quarkus MCP SSE server:
318+
[NOTE]
319+
====
320+
Ensure that you have https://github.com/modelcontextprotocol/inspector/releases/tag/0.6.0[modelcontextprotocol/inspector] version 0.6.0 or later installed as it adds support for specifying bearer token authentication.
321+
====
322+
323+
Navigate to the URL provided into a browser.
324+
325+
Change the _Transport Type_ dropdown to `SSE` and the _URL_ to `http://localhost:8080/mcp/sse` so that it targets the running Quarkus MCP Server:
326+
327+
Select the _Authorization_ button and paste the copied GitHub access token from the browser to the `Bearer Token` field and connect to the Quarkus MCP SSE server:
319328

320329
image::mcp_inspector_connect.png[MCP Inspector Connect,align="center"]
321330

@@ -329,7 +338,7 @@ You will see the name from your GitHub account returned.
329338

330339
Finally, let's use `curl` and also learn a little bit how both the MCP protocol and MCP SSE transport work.
331340

332-
First, access the main SSE endpoint without the GitHub access token:
341+
First, open a new terminal window and access the main SSE endpoint without the GitHub access token:
333342

334343
[source,shell]
335344
----
@@ -338,7 +347,7 @@ curl -v localhost:8080/mcp/sse
338347

339348
You will get HTTP 401 error.
340349

341-
Use the access token to access MCP server:
350+
Use the access token that was obtained previously to access MCP server:
342351

343352
```shell script
344353
curl -v -H "Authorization: Bearer gho_..." localhost:8080/mcp/sse
@@ -357,7 +366,7 @@ data: /messages/ZTZjZDE5MzItZDE1ZC00NzBjLTk0ZmYtYThiYTgwNzI1MGJ
357366
The SSE connection is created. Note the unique path in the received `data`, we need this path to invoke the tools.
358367
We cannot invoke the tool directly, we first need to follow the MCP handshake protocol.
359368

360-
Open another window and use the same access token to initialize the curl as MCP client, and access the tool, using the value of the `data` property to build the target URL.
369+
Open another terminal window and use the same GitHub access token to initialize the curl as MCP client, and access the tool, using the value of the `data` property to build the target URL.
361370

362371
Send the client initialization request:
363372

@@ -429,7 +438,7 @@ where the `call.json` file has a content like this:
429438
}
430439
----
431440

432-
Now look at the SSE connection window and you will see the name from your GitHub account returned.
441+
Now look at the terminal window containing the SSE connection and you will see the name from your GitHub account returned.
433442

434443
== Conclusion
435444

0 commit comments

Comments
 (0)