@mcp-apps/api-tools-mcp-server
Version:
MCP server for interacting with APIs and web services
33 lines (32 loc) • 860 B
TypeScript
export interface ApiRequestConfig {
endpoint: string;
method: string;
path?: string;
queryParams?: Record<string, string>;
headers?: Record<string, string>;
body?: any;
authType?: 'bearer' | 'basic' | 'interactive' | 'none';
authConfig?: {
token?: string;
username?: string;
password?: string;
clientId?: string;
authority?: string;
tenantId?: string;
scopes?: string[] | undefined;
redirectUri?: string;
useBroker?: boolean;
};
}
export interface ApiResponse<T = any> {
success: boolean;
status: number;
data?: T;
error?: string;
headers?: Record<string, string>;
response?: any;
}
export declare class ApiService {
static callApi<T = any>(config: ApiRequestConfig): Promise<ApiResponse<T>>;
private static buildUrl;
}