This directory contains example AI agents that interact with the IBM i MCP Server.
curl -LsSf https://astral.sh/uv/install.sh | shcd client
uv syncEnsure the IBM i MCP server is running:
# From the main project directory
cd ibmi-mcp-server
npx -y @ibm/ibmi-mcp-server@latest --transport http --tools ./toolsIn another terminal, navigate to the client directory (this directory) and run:
uv run mcp_client.pyCreate a .env file in this directory with your OpenAI API key:
# Create .env file
cat > .env << EOF
OPENAI_API_KEY=your-openai-api-key-here
EOFGet your OpenAI API key:
- Visit OpenAI API Keys
- Create a new API key
- Copy it to your
.envfile
# Use a custom prompt
uv run agent.py -p "What's my system status?" --model-id "openai:gpt-4o"
# Or run with the default prompt
uv run agent.py
# Get help
uv run agent.py -hTo run the agent with ollama:
uv run agent.py -p "What's my system status?" --model-id "ollama:qwen2.5:latest"
# with gpt-oss
uv run agent.py -p "What's my system status?" --model-id "ollama:gpt-oss:latest"agent.py: The main example agent that connects to your IBM i MCP server and allows natural language queries.list_tool_annotations.py: A test script that demonstrates how to use tool annotations with the agent.list_toolset_resources.py: A test script that demonstrates how to use toolset resources with the agent.test_auth_agent.py: A test script that demonstrates how to use authentication with the agent.