By Markus van Kempen |
Series: WXO Labs & Tutorial Guide (Part 7 of 15)
Interactive Lab Portal: https://markusvankempen.github.io/wxo-labs/
GitHub Repository: https://github.com/markusvankempen/wxo-labs
Python tools are great for simple in-process tasks, but enterprise IT requires connecting to microservices, databases, and sidecar processes written in Node.js, Go, or Python. Model Context Protocol (MCP) is the industry standard for bridging LLMs with external tools over JSON-RPC.
Ensure your environment has the required dependencies:
pip install ibm-watsonx-orchestrate
Verify active environment:
orchestrate env list
simple_mcp_server.py)from mcp.server import Server
from mcp.server.stdio import stdio_server
import mcp.types as types
import asyncio
mcp = Server("sample-ticket-mcp-server")
@mcp.tool()
async def search_support_tickets(priority: str = "HIGH") -> str:
"""
Query enterprise support tickets by priority level.
Args:
priority: Filter level ('CRITICAL', 'HIGH', 'MEDIUM', 'LOW').
"""
return f"""
π« Active Tickets [{priority} Priority]:
1. #TCK-901: Database latency spike in ca-tor (Assigned: Site Reliability)
2. #TCK-904: SSL Certificate renewal for api.internal (Assigned: Security)
"""
async def main():
async with stdio_server() as (read_stream, write_stream):
await mcp.run(
read_stream,
write_stream,
mcp.create_initialization_options()
)
if __name__ == "__main__":
asyncio.run(main())
requirements.txt)mcp>=1.0.0
ibm-watsonx-orchestrate>=2.9.0
agent.yaml)spec_version: v1
kind: native
name: mcp_support_agent
title: "MCP Support Triage"
description: "Integrates with external systems using Model Context Protocol (MCP)."
model: ibm/granite-3-8b-instruct
instructions: |
You are a support operations agent. Connect to the MCP ticket server
and query tickets for the user.
tools:
- search_support_tickets
Import tool and test conversationally:
orchestrate toolkits add --kind mcp --package-root ./mcp_discovery_test
Live Response:
[INFO] - Discovering tools from MCP server 'sample-ticket-mcp-server'...
[INFO] - Found 1 tool: search_support_tickets
[SUCCESS] - MCP Toolkit added successfully.
When publishing this blog post, select or enter the following tags in the community editor:
watsonx Orchestrate, Model Context Protocol, MCP, Sidecars, JSON-RPC, STDIO Transport, AI Tools
This tutorial is Part 7 of 15 in the complete enterprise hands-on series:
Explore the interactive curriculum and code repository: