Importing a New MCP Tool into the Platform
Overview
MCP (Model Context Protocol) tools extend the capabilities of AI agents by providing access to external services, APIs, and resources. Rossoctl allows you to deploy MCP tools either from source code or from pre-existing container images.
Pre-requisites
Deploying from Source
Before importing a new tool from source, ensure that:
- The tool code is hosted on GitHub and is public or at least accessible using the GitHub credentials provided during the Rossoctl installation.
- The tool code is organized within a sub-directory of the Git repository (not in the root directory) that contains a
Dockerfile.
Tool Examples
See the Rossoctl agent examples repo for a variety of MCP tool examples.
Steps to Import a New Tool
Step 1: Access the Import New Tool Section
- Log in to the Rossoctl UI.
- Navigate to the "Import New Tool" section.
Step 2: Configure Environment Variables
- Manually add environment variables required by your tool.
- Alternatively, import environment variables from a
.envfile hosted on GitHub.
Step 3: Select Deployment Method
Deploy from an existing Docker image
- Select "deploy from existing image" as the deployment method, and provide the URI of the image in a container registry
Deploy from source code
- Select "Build from source" as the deployment method
- In "Git Repository URL", enter the root of your GitHub repository where your project lives.
- In "Git Branch or Tag" - If your project exists in a different branch than Main, such as a PR branch, specify the branch or tag
- Under "Specify Source Subfolder" type the name of the subfolder of your Git repo where the code can be found.
Step 4: Configure Build Options (Source Builds Only)
When building from source, you can configure additional build options:
Build Strategy
Rossoctl uses Shipwright to build container images. The build strategy is automatically selected based on your registry:
| Registry Type | Strategy | Description |
|---|---|---|
| Internal (Kind cluster) | buildah-insecure-push | For registries without TLS |
| External (quay.io, ghcr.io, docker.io) | buildah | For registries with TLS |
You can override the strategy in the "Build Configuration" section.
Registry Configuration
- Registry URL: Where to push the built image (e.g.,
registry.cr-system.svc.cluster.local:5000for internal,quay.io/myorgfor external) - Registry Secret: Name of the Kubernetes Secret containing registry credentials (required for external registries)
- Image Tag: Version tag for the image (default:
v0.0.1)
Advanced Build Options
Expand "Advanced Build Options" to configure:
- Dockerfile path - Default is
Dockerfilein the context directory - Build timeout - Default is 15 minutes
- Build arguments - Optional build-time variables (KEY=VALUE format)
Step 5: Build and Deploy
Press the "Build & Deploy Tool" button.
Once the build succeeds, Rossoctl automatically:
- Creates a Deployment and Service for the tool with the built image
- Rossoctl creates an HTTPRoute for gateway access if "Enable external access to the tool endpoint" is checked
- Redirects you to the Tool detail page
For image deployments, the Deployment and Service are created immediately.
Using Tools with Agents
Once deployed, tools can be used by agents through direct connection or via the MCP Gateway. Agents invoke tools using the MCP protocol.
Configuring MCP_URL / MCP_URLS
Agents connect to tools using environment variables:
MCP_URL(singular) - For agents that use a single tool or connect via the MCP GatewayMCP_URLS(plural) - For agents that connect directly to multiple tools (comma-separated list)
The example agents in the agent-examples repository include .env.openai or .env.ollama files with default values that assume the tool is deployed in the same namespace as the agent.
Related Documentation
Deployment Issues
See the Troubleshooting section.