Get your agent’s MCP URL and Access Token from its Integration & Sharing → Integration tab. See Agents and the MCP overview.
Features
- List Tools: Dynamically fetch and display all available tools, their descriptions, and input schemas.
- Call Tools: Invoke specific tools with custom JSON arguments via the command line.
- Environment Support: Securely load your MCP URL and Authorization Token from a
.envfile.
Setup
- Clone or copy the files to your project directory.
-
Create a virtual environment (recommended):
-
Install dependencies:
-
Configure Environment Variables:
Copy the example environment file and fill in your credentials:
Open
.envand set yourMCP_URLandMCP_TOKEN.
Quick Start Example
Explore MCP tools programmatically using Python:explore_mcp_tools.py
Usage
List Available Tools
To see all tools supported by the agent:Call a Specific Tool
To execute a tool, provide its name and a JSON string for the arguments:Override Configuration
You can also pass the URL and Token directly via CLI arguments:Detailed Tool Examples
Here are examples of how to call each available tool using the CLI:1. Query
Ask a question to the agent:2. Get Resource Download URL
Get URLs for specific resource IDs (usually obtained from citations in a query result):3. Get Resources
Inquire about specific file paths:4. Sync Agent Workflow
Trigger a synchronization of the agent’s workflow to pick up the latest data:5. Deploy Agent
Deploy the agent to apply the latest changes/data:Available MCP Tools
Use
--list (shown above) to fetch the live tool list and input schemas directly from your agent.
