@mcpkit/server-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

MCP Kit Server SDK

Purpose

This TypeScript SDK provides a client interface for interacting with the MCP Kit API.

Installation

npm install @mcpkit/server-sdk
# or yarn add @mcpkit/server-sdk
# or pnpm add @mcpkit/server-sdk

Usage (McpServerClient)

import { McpServerClient } from "@mcpkit/server-sdk";

const apiKey = process.env.MCPKIT_API_KEY; // Ensure this is set
if (!apiKey) {
  throw new Error("MCPKIT_API_KEY environment variable is not set.");
}

const client = new McpServerClient(apiKey);

async function listServers() {
  try {
    const servers = await client.getServers();
    console.log("Available Servers:", servers);

    if (servers.length > 0) {
      const firstServerId = servers[0].id;
      const tools = await client.getToolsForServer(firstServerId);
      console.log(`Tools for server ${firstServerId}:`, tools);
    }
  } catch (error) {
    console.error("Error interacting with MCP Kit Server:", error);
  }
}

listServers();

Development

  1. Install Dependencies:
    npm install
    # or yarn install / pnpm install
  2. Build:
    npm run build # Or equivalent script (likely runs tsc)
    This compiles TypeScript files from src/ to JavaScript in dist/.

Package Sidebar

Install

npm i @mcpkit/server-sdk

Weekly Downloads

22

Version

0.1.2

License

MIT

Unpacked Size

15.9 kB

Total Files

4

Last publish

Collaborators

  • trevoruptain