askexperts
Version:
AskExperts SDK: build and use AI experts - ask them questions and pay with bitcoin on an open protocol
36 lines (35 loc) • 1.42 kB
TypeScript
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { ReplyMCP } from "../client/AskExpertsSmartClient.js";
/**
* AskExpertsSmartMCP class that extends McpServer and provides a simplified interface
* for clients to interact with the AskExpertsClient with LLM capabilities
*/
export declare class AskExpertsSmartMCP extends McpServer {
private client;
/**
* Creates a new AskExpertsSmartMCP instance
*
* @param nwcString - NWC connection string for payments
* @param openaiApiKey - OpenAI API key
* @param openaiBaseUrl - OpenAI base URL
* @param discoveryRelays - Optional list of discovery relays
*/
constructor(nwcString: string, openaiApiKey: string, openaiBaseUrl: string, discoveryRelays?: string[]);
/**
* Register all tools with the MCP server
*/
private registerTools;
/**
* Delegates to the client to ask experts a question
*
* @param question - Question to ask
* @param max_amount_sats - Maximum amount to pay in satoshis
* @param requirements - Optional requirements to experts that should be selected
* @returns Promise resolving to array of ReplyMCP objects
*/
askExperts(question: string, max_amount_sats: number, requirements?: string): Promise<ReplyMCP[]>;
/**
* Disposes of resources when the object is no longer needed
*/
[Symbol.dispose](): void;
}