-
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
base: lightspeed-docs-main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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). |
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 | ||
---- | ||
|
||
. Modify the `spec.ols.featureGates` specification to include 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 | ||
Comment on lines
+45
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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. |
||
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. |
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.
add
MCPServer
to the listspec.ols.featureGates
to activate MCP Server feature.Then define connection details for each MCP server in the list
mcpServers
.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.
to be noticed that without MCPServer in the featureGates, configuration of mcpServers will not be taken into account.
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.
done