diff --git a/mcp-servers-on-oci-container-instances/connect/connect-ai-client.md b/mcp-servers-on-oci-container-instances/connect/connect-ai-client.md index f80b8e34f..533989a97 100644 --- a/mcp-servers-on-oci-container-instances/connect/connect-ai-client.md +++ b/mcp-servers-on-oci-container-instances/connect/connect-ai-client.md @@ -3,8 +3,9 @@ ## Introduction In this lab, you configure an MCP-capable AI client to use the remote MCP -servers that are running on OCI. The examples use Codex and Cline because both -were validated with the OCI-hosted endpoints. +servers that are running on OCI. The examples were validated with the +OCI-hosted endpoints and are provided so you can choose the client harness that +matches your workflow. Estimated Time: 10 minutes @@ -12,11 +13,12 @@ Estimated Time: 10 minutes In this lab, you will: -* configure Streamable HTTP MCP server entries for one validated AI client; +* configure Streamable HTTP MCP server entries for one MCP-capable AI client; * confirm the client can see the OCI-hosted MCP servers. -Use either the Codex path or the Cline path for the timed lab. The other client -configuration is included as a reference if you want to try a second client. +Use one client path for the timed lab. You can use a different option if your +preferred client harness is Codex, Cline, VS Code GitHub Copilot Chat, or Google +Antigravity. ### Prerequisites @@ -41,7 +43,7 @@ MCP-capable AI client configuration. /playwright/mcp ``` -3. Complete either Task 2 or Task 3 for your chosen client. +3. Complete Task 2, Task 3, Task 4, or Task 5 for your chosen client. ## Task 2: Option A - Configure Codex @@ -140,7 +142,97 @@ MCP-capable AI client configuration. * `oci_github` * `oci_playwright` -## Task 4: Confirm your client is using the OCI-hosted servers +## Task 4: Option C - Configure VS Code GitHub Copilot Chat + +1. In VS Code, open the Command Palette: + + * macOS: **Command+Shift+P** + * Windows or Linux: **Ctrl+Shift+P** + +2. Open one MCP configuration file: + + * For your VS Code user profile, run **MCP: Open User Configuration**. + * For the current workspace, run + **MCP: Open Workspace Folder MCP Configuration**. + + Use one location for these `oci_*` server entries. + +3. Add the remote MCP servers to the `mcp.json` file that VS Code opens. + + ```json + { + "servers": { + "oci_terraform": { + "type": "http", + "url": "/terraform/mcp" + }, + "oci_github": { + "type": "http", + "url": "/github/mcp", + "headers": { + "Authorization": "Bearer ${env:GITHUB_PAT_TOKEN}" + } + }, + "oci_playwright": { + "type": "http", + "url": "/playwright/mcp" + } + } + } + ``` + +4. For GitHub MCP, set `GITHUB_PAT_TOKEN` in the environment used by VS Code. + Do not store a real token in `mcp.json`. + +5. Save `mcp.json`, then start the MCP servers from the configuration file + controls in VS Code. + +6. Open GitHub Copilot Chat, select **Agent** mode, and use the tools picker to + confirm the `oci_*` MCP servers and tools are available. + +## Task 5: Option D - Configure Google Antigravity + +1. Add the remote MCP servers to one Antigravity MCP configuration file: + + * global configuration: `~/.gemini/config/mcp_config.json` + * workspace configuration: `.agents/mcp_config.json` + +2. Add the remote MCP servers. + + ```json + { + "mcpServers": { + "oci_terraform": { + "disabled": false, + "serverUrl": "/terraform/mcp" + }, + "oci_github": { + "serverUrl": "/github/mcp", + "headers": { + "Authorization": "Bearer " + } + }, + "oci_playwright": { + "disabled": false, + "serverUrl": "/playwright/mcp" + } + } + } + ``` + +3. For GitHub MCP, replace `` only in your local + Antigravity configuration. Do not store a real token in a tracked workspace + file. + +4. Open Antigravity and use `/mcp` to view the MCP server manager. + +5. Confirm the expected server names are present: + + * `oci_terraform` + * `oci_github` + * `oci_playwright` + +## Task 6: Confirm your client is using the OCI-hosted servers 1. Ask your AI client to list the available MCP tools. The remote OCI-hosted servers should appear with names or namespaces that include: diff --git a/mcp-servers-on-oci-container-instances/deploy/deploy.md b/mcp-servers-on-oci-container-instances/deploy/deploy.md index 68b289cdd..eaaaa5309 100644 --- a/mcp-servers-on-oci-container-instances/deploy/deploy.md +++ b/mcp-servers-on-oci-container-instances/deploy/deploy.md @@ -28,7 +28,7 @@ networking, API Gateway, and Container Instance resources. 1. Select **Deploy to Oracle Cloud**. - [![Deploy to Oracle Cloud](../images/deploy-to-oracle-cloud-centered.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/Phirlly/developer/raw/main/mcp-servers-on-oci-container-instances/files/resource-manager/mcp-servers-on-oci-container-instances-rm.zip) + [![Deploy to Oracle Cloud](../images/deploy-to-oracle-cloud-centered.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle-livelabs/developer/raw/main/mcp-servers-on-oci-container-instances/files/resource-manager/mcp-servers-on-oci-container-instances-rm.zip) ![Deploy to Oracle Cloud button](../images/01-create-stack-package.png) diff --git a/mcp-servers-on-oci-container-instances/files/client-config/antigravity.example.json b/mcp-servers-on-oci-container-instances/files/client-config/antigravity.example.json new file mode 100644 index 000000000..e1d945935 --- /dev/null +++ b/mcp-servers-on-oci-container-instances/files/client-config/antigravity.example.json @@ -0,0 +1,18 @@ +{ + "mcpServers": { + "oci_terraform": { + "disabled": false, + "serverUrl": "/terraform/mcp" + }, + "oci_github": { + "serverUrl": "/github/mcp", + "headers": { + "Authorization": "Bearer " + } + }, + "oci_playwright": { + "disabled": false, + "serverUrl": "/playwright/mcp" + } + } +} diff --git a/mcp-servers-on-oci-container-instances/files/client-config/vscode-copilot.example.json b/mcp-servers-on-oci-container-instances/files/client-config/vscode-copilot.example.json new file mode 100644 index 000000000..3b2623ffc --- /dev/null +++ b/mcp-servers-on-oci-container-instances/files/client-config/vscode-copilot.example.json @@ -0,0 +1,19 @@ +{ + "servers": { + "oci_terraform": { + "type": "http", + "url": "/terraform/mcp" + }, + "oci_github": { + "type": "http", + "url": "/github/mcp", + "headers": { + "Authorization": "Bearer ${env:GITHUB_PAT_TOKEN}" + } + }, + "oci_playwright": { + "type": "http", + "url": "/playwright/mcp" + } + } +} diff --git a/mcp-servers-on-oci-container-instances/images/09-resource-manager-outputs.png b/mcp-servers-on-oci-container-instances/images/09-resource-manager-outputs.png index 19bdeaf23..14712e007 100644 Binary files a/mcp-servers-on-oci-container-instances/images/09-resource-manager-outputs.png and b/mcp-servers-on-oci-container-instances/images/09-resource-manager-outputs.png differ diff --git a/mcp-servers-on-oci-container-instances/images/11-container-instance-details.png b/mcp-servers-on-oci-container-instances/images/11-container-instance-details.png index 89b57f431..8d9923933 100644 Binary files a/mcp-servers-on-oci-container-instances/images/11-container-instance-details.png and b/mcp-servers-on-oci-container-instances/images/11-container-instance-details.png differ diff --git a/mcp-servers-on-oci-container-instances/readme.md b/mcp-servers-on-oci-container-instances/readme.md index 0c7346853..d16e173b3 100644 --- a/mcp-servers-on-oci-container-instances/readme.md +++ b/mcp-servers-on-oci-container-instances/readme.md @@ -19,7 +19,7 @@ Use the step-by-step guide: ## Deploy to OCI

- + Deploy to Oracle Cloud