Mcp client
Bases: MCPToolClient, OperatorClient
MCP client for operators, inherits from MCPToolClient and OperatorClient.
Source code in blue/operators/clients/mcp_client.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
__init__(name, properties={})
Initialize the MCPOperatorClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
Name of the MCP operator client. |
required | |
properties
|
Properties for the client. Defaults to {}. |
{}
|
Source code in blue/operators/clients/mcp_client.py
21 22 23 24 25 26 27 28 | |
execute_operator(operator, args, kwargs)
Execute a specific operator with given arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
operator
|
Name of the operator. |
required | |
args
|
Arguments for the operator. |
required | |
kwargs
|
Keyword arguments for the operator. |
required |
Returns:
| Type | Description |
|---|---|
|
Result of the operator execution |
Source code in blue/operators/clients/mcp_client.py
51 52 53 54 55 56 57 58 59 60 61 62 | |
fetch_operator_metadata(operator)
Fetch metadata for a specific operator from MCP client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
operator
|
Name of the operator. |
required |
Returns:
| Type | Description |
|---|---|
|
Dictionary containing operator metadata. |
Source code in blue/operators/clients/mcp_client.py
39 40 41 42 43 44 45 46 47 48 | |
fetch_operators()
Fetch available operators from MCP client.
Returns:
| Type | Description |
|---|---|
|
List of available operators. |
Source code in blue/operators/clients/mcp_client.py
31 32 33 34 35 36 37 | |
get_operator_attributes(operator)
Get attributes of a specific operator. Currently, MCP does not support fetching operator attributes, so this method returns an empty dictionary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
operator
|
Name of the operator. |
required |
Returns:
| Type | Description |
|---|---|
|
Dictionary of operator attributes. |
Source code in blue/operators/clients/mcp_client.py
80 81 82 83 84 85 86 87 88 89 90 91 | |
refine_operator(operator, args, kwargs)
Refine the operator based on given arguments, returns list of possible refinements as DataPipeline objects. Currently, MCP does not support operator refinement, so this method returns an empty list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
operator
|
Name of the operator. |
required | |
args
|
Arguments for the operator. |
required | |
kwargs
|
Keyword arguments for the operator. |
required |
Returns:
| Type | Description |
|---|---|
|
List of possible refinements as DataPipeline objects. |
Source code in blue/operators/clients/mcp_client.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |