@access-mcp/compute-resources
Version:
MCP server for ACCESS-CI Compute Resources API
62 lines (61 loc) • 2.35 kB
TypeScript
import { BaseAccessServer, Tool, Resource, CallToolResult } from "@access-mcp/shared";
import { CallToolRequest, ReadResourceRequest, ReadResourceResult, GetPromptResult } from "@modelcontextprotocol/sdk/types.js";
export declare class ComputeResourcesServer extends BaseAccessServer {
constructor();
protected getTools(): Tool[];
protected getResources(): Resource[];
protected getPrompts(): {
name: string;
description: string;
arguments: {
name: string;
description: string;
required: boolean;
}[];
}[];
handleToolCall(request: CallToolRequest): Promise<CallToolResult>;
/**
* Router for consolidated search_resources tool
* Routes to appropriate handler based on parameters
*/
private searchResourcesRouter;
handleResourceRead(request: ReadResourceRequest): Promise<ReadResourceResult>;
handleGetPrompt(request: {
params: {
name: string;
arguments?: Record<string, string>;
};
}): Promise<GetPromptResult>;
/**
* Static mapping of known organization IDs to names.
* This serves as a fallback when the API doesn't return organization info.
*
* These names are fetched from /wh2/cider/v1/organizations/ endpoint.
* Mapping updated: 2025-10-21 via scripts/fetch-organizations-working-endpoint.js
*
* Note: API should be preferred (see listComputeResources method), this is only
* used if API fetch fails. Allows new organizations to be discovered automatically.
*/
private readonly KNOWN_ORGANIZATIONS;
/**
* Common organization abbreviations for better search UX
* Includes HPC centers, universities, and research institutions
*/
private readonly ORG_ABBREVIATIONS;
private listComputeResources;
private getComputeResource;
private getResourceHardware;
/**
* Add contextual documentation links - only included when genuinely helpful
*
* @param context - What operation is being performed ('list' | 'search' | 'details')
*/
private addDocumentation;
/**
* Structure raw hardware items into organized categories
*/
private structureHardwareInfo;
private detectGpuCapability;
private determineResourceType;
private searchResources;
}