AxMCPClient
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L76
Constructors
Constructor
new AxMCPClient(transport: AxMCPTransport, options: Readonly<AxMCPClientOptions>): AxMCPClient;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L89
Parameters
| Parameter | Type |
|---|---|
transport | AxMCPTransport |
options | Readonly<AxMCPClientOptions> |
Returns
AxMCPClient
Methods
cancelRequest()
cancelRequest(id: string): void;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L506
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
void
getCapabilities()
getCapabilities(): object;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L397
Returns
object
| Name | Type |
|---|---|
prompts | boolean |
resources | boolean |
tools | boolean |
getPrompt()
getPrompt(name: string, args?: Record<string, string>): Promise<AxMCPPromptGetResult>;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L431
Parameters
| Parameter | Type |
|---|---|
name | string |
args? | Record<string, string> |
Returns
Promise<AxMCPPromptGetResult>
hasPromptsCapability()
hasPromptsCapability(): boolean;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L409
Returns
boolean
hasResourcesCapability()
hasResourcesCapability(): boolean;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L413
Returns
boolean
hasToolsCapability()
hasToolsCapability(): boolean;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L405
Returns
boolean
init()
init(): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L104
Returns
Promise<void>
listPrompts()
listPrompts(cursor?: string): Promise<AxMCPPromptsListResult>;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L417
Parameters
| Parameter | Type |
|---|---|
cursor? | string |
Returns
Promise<AxMCPPromptsListResult>
listResources()
listResources(cursor?: string): Promise<AxMCPResourcesListResult>;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L447
Parameters
| Parameter | Type |
|---|---|
cursor? | string |
Returns
Promise<AxMCPResourcesListResult>
listResourceTemplates()
listResourceTemplates(cursor?: string): Promise<AxMCPResourceTemplatesListResult>;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L461
Parameters
| Parameter | Type |
|---|---|
cursor? | string |
Returns
Promise<AxMCPResourceTemplatesListResult>
ping()
ping(timeout: number): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L368
Parameters
| Parameter | Type | Default value |
|---|---|---|
timeout | number | 3000 |
Returns
Promise<void>
readResource()
readResource(uri: string): Promise<AxMCPResourceReadResult>;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L477
Parameters
| Parameter | Type |
|---|---|
uri | string |
Returns
Promise<AxMCPResourceReadResult>
subscribeResource()
subscribeResource(uri: string): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L490
Parameters
| Parameter | Type |
|---|---|
uri | string |
Returns
Promise<void>
toFunction()
toFunction(): AxFunction[];
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L389
Returns
unsubscribeResource()
unsubscribeResource(uri: string): Promise<void>;
Defined in: https://github.com/ax-llm/ax/blob/05ff5bd88d050f7ba85a3fcc6eb0ed2975ad7d51/src/ax/mcp/client.ts#L498
Parameters
| Parameter | Type |
|---|---|
uri | string |
Returns
Promise<void>