typescript-sdk/dist/server/index.d.ts
David Soria Parra 02e421c1f1
Initial import
2024-09-24 21:53:34 +01:00

30 lines
No EOL
1.3 KiB
TypeScript
Generated

import { Protocol } from "../shared/protocol.js";
import { ClientCapabilities, ClientNotification, ClientRequest, ClientResult, Implementation, ServerNotification, ServerRequest, ServerResult } from "../types/index.js";
/**
* An MCP server on top of a pluggable transport.
*
* This server will automatically respond to the initialization flow as initiated from the client.
*/
export declare class Server extends Protocol<ClientRequest, ClientNotification, ClientResult, ServerRequest, ServerNotification, ServerResult> {
private _serverInfo;
private _clientCapabilities?;
private _clientVersion?;
/**
* Callback for when initialization has fully completed (i.e., the client has sent an `initialized` notification).
*/
oninitialized?: () => void;
/**
* Initializes this server with the given name and version information.
*/
constructor(_serverInfo: Implementation);
private _oninitialize;
/**
* After initialization has completed, this will be populated with the client's reported capabilities.
*/
getClientCapabilities(): ClientCapabilities | undefined;
/**
* After initialization has completed, this will be populated with information about the client's name and version.
*/
getClientVersion(): Implementation | undefined;
}
//# sourceMappingURL=index.d.ts.map