|
| 1 | +// Module included in the following assemblies: |
| 2 | +// * lightspeed-docs-main/configure/ols-configuring-openshift-lightspeed.adoc |
| 3 | + |
| 4 | +:_mod-docs-content-type: PROCEDURE |
| 5 | +[id="ols-enabling-mcp-server_{context}"] |
| 6 | += Enabling MCP server |
| 7 | + |
| 8 | +Enable a Model Context Protocol (MCP) server to securely access a large language model (LLM) and one or more external tools, such as a databases or API, and to provide the the {ols-long} service with the most current information. |
| 9 | + |
| 10 | +.Prerequisites |
| 11 | + |
| 12 | +* You have installed the the {ols-long} Operator. |
| 13 | +
|
| 14 | +* You have configured a large language model provider. |
| 15 | +
|
| 16 | +* You have deployed the {ols-long} service. |
| 17 | +
|
| 18 | +.Procedure |
| 19 | + |
| 20 | +. Open the {ols-long} `OLSconfig` custom resource (CR) file by running the following command: |
| 21 | ++ |
| 22 | +[source,terminal] |
| 23 | +---- |
| 24 | +$ oc edit olsconfig cluster |
| 25 | +---- |
| 26 | + |
| 27 | +. Modify the `spec.ols.featureGates` specification to include MCP server information. |
| 28 | ++ |
| 29 | +[source,yaml] |
| 30 | +---- |
| 31 | +apiVersion: ols.openshift.io/v1alpha1 |
| 32 | +kind: OLSConfig |
| 33 | +metadata: |
| 34 | + name: cluster |
| 35 | +spec: |
| 36 | + featureGate: |
| 37 | + - MCPServer <1> |
| 38 | + mcpServers: |
| 39 | + - name: mcp-server-1 <2> |
| 40 | + transport: sse / streamable_http <3> |
| 41 | + streamableHTTP: |
| 42 | + url: http://localhost:8080/mcp <4> |
| 43 | + timeout: 30 <5> |
| 44 | + sseReadTimeout: 10 <6> |
| 45 | + headers: |
| 46 | + - Authorization: Bearer <token> |
| 47 | + - Content-Type: application/json |
| 48 | + - Accept: application/json |
| 49 | +---- |
| 50 | +<1> Specifies the MCPServer functionality. |
| 51 | +<2> Specifies the name of the MCP server. |
| 52 | +<3> Specifies the transport protocol that the MCP server uses to communicate. |
| 53 | +<4> Specifies the URL path that the MCP server uses to communicate. |
| 54 | +<5> 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. |
| 55 | +<6> 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. |
| 56 | + |
| 57 | +. Click *Save*. |
| 58 | ++ |
| 59 | +The save operation saves the file and applies the changes so that the MCP server is available to the {ols-long} service. |
0 commit comments