-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OLS-2018:Document enabling MCP server #97459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rh-tokeefe
wants to merge
2
commits into
openshift:lightspeed-docs-main
Choose a base branch
from
rh-tokeefe:OLS-2018
base: lightspeed-docs-main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Module included in the following assemblies: | ||
// * lightspeed-docs-main/configure/ols-configuring-openshift-lightspeed.adoc | ||
|
||
:_mod-docs-content-type: CONCEPT | ||
[id="about-mcp-server_{context}"] | ||
= About Model Context Protocol (MCP) server | ||
|
||
A Model Context Protocol (MCP) server is a program that implements the Model Context Protocol. The protocol creates a secure intermediary between a large language model (LLM) and external resources, such as data sources or software applications. Using the protocol, an MCP server provides a standardized way for an LLM to increase context by requesting and receiving real-time updates from external resources. This functionality transforms the LLM from a static knowledge base into a dynamic system that uses real-time information to answer questions or complete actions. | ||
|
||
:FeatureName: MCP server | ||
include::snippets/technology-preview.adoc[] | ||
|
||
MCP server is disabled by default. To enable the functionality, add the `spec.featureGate.MCPServer` specification to the `OLSConfig` custom resource (CR). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// Module included in the following assemblies: | ||
// * lightspeed-docs-main/configure/ols-configuring-openshift-lightspeed.adoc | ||
|
||
:_mod-docs-content-type: PROCEDURE | ||
[id="ols-enabling-mcp-server_{context}"] | ||
= Enabling MCP server | ||
|
||
Enable the Model Context Protocol (MCP) server so that a large language model (LLM) can securely access an external tool, such as a database or API, and obtain real-time updates. | ||
|
||
.Prerequisites | ||
|
||
* You have installed the the {ols-long} Operator. | ||
|
||
* You have configured a large language model provider. | ||
|
||
* You have deployed the {ols-long} service. | ||
|
||
.Procedure | ||
|
||
. Open the {ols-long} `OLSconfig` custom resource (CR) file by running the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ oc edit olsconfig cluster | ||
---- | ||
|
||
. Add `MCPServer` to the `spec.ols.featureGates` specification file and include the MCP server information. | ||
+ | ||
[source,yaml] | ||
---- | ||
apiVersion: ols.openshift.io/v1alpha1 | ||
kind: OLSConfig | ||
metadata: | ||
name: cluster | ||
spec: | ||
featureGate: | ||
- MCPServer <1> | ||
mcpServers: | ||
- name: mcp-server-1 <2> | ||
streamableHTTP: | ||
url: http://localhost:8080/mcp <3> | ||
timeout: 30 | ||
sseReadTimeout: 10 | ||
headers: | ||
- Authorization: Bearer <token> | ||
- Content-Type: application/json | ||
- Accept: application/json | ||
enableSSE: true | ||
- name: mcp-server-2 | ||
streamableHTTP: | ||
url: http://localhost:8080/mcp | ||
timeout: 30 <4> | ||
sseReadTimeout: 10 <5> | ||
headers: | ||
- Authorization: Bearer <token> | ||
- Content-Type: application/json | ||
- Accept: application/json | ||
enableSSE: true <6> | ||
---- | ||
<1> Specifies the MCPServer functionality. | ||
<2> Specifies the name of the MCP server. | ||
<3> Specifies the URL path that the MCP server uses to communicate. | ||
<4> Specifies the time that the MCP server has to respond to a query. If the client does not receive a query within the time specified, the MCP server times out. In this example, the timeout is 30 seconds. | ||
<5> Specifies the amount of time a client waits for new data from a Server-Sent Events (SSE) connection. If the client does not receive data within that time, the client closes the connection. | ||
<6> When you set `enableSSE` to true the MCP server establishes a one-way channel that the MCP server uses to push updates to the client whenever the server has new information. The default setting is `false`. | ||
|
||
. Click *Save*. | ||
+ | ||
The save operation saves the file and applies the changes so that the MCP server is available to the {ols-long} service. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont know what headers the user might put here, but they will not be these 3 ^^"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@onmete do you know what headers could be set here for requests to MCP servers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The service is providing "kubernetes-authorization: Bearer {user_token}" to the openshift mcp server.