Integrate
Integrations

Default (server)

Server-level tools provided by Integrate

The default server integration provides access to server-level tools that don't belong to a specific integration. These tools are always available on both the client and server without any configuration.

Installation

The server namespace is automatically included with the SDK - no installation needed. It's always available on all MCP clients:

import { client } from "integrate-sdk";

// Server namespace is always available
const tools = await client.server.listToolsByIntegration({
  integration: "github",
});

Setup

No Configuration Required

Unlike other integrations, the server namespace requires no setup or configuration. It's automatically included in both:

  • MCP Client - Available via client.server.* on all clients
  • MCP Server - Automatically handles server-level tool calls

Client-Side Usage

The default client automatically includes the server namespace. You can use it directly:

import { client } from "integrate-sdk";

const tools = await client.server.listToolsByIntegration({
  integration: "github",
});

If you're using a custom client, the server namespace is still always available:

import { createMCPClient, githubIntegration } from "integrate-sdk";

const customClient = createMCPClient({
  integrations: [githubIntegration()],
});

// Server namespace is always available, even on custom clients
const tools = await customClient.server.listToolsByIntegration({
  integration: "github",
});

Server-Side Usage

When using the server client, the server namespace is also available:

import { createMCPServer, githubIntegration } from "integrate-sdk/server";

export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [githubIntegration()],
});

// Server namespace works on server clients too
const tools = await serverClient.server.listToolsByIntegration({
  integration: "github",
});

Available Tools

Tool Discovery

  • listAllProviders - List all providers available on the MCP server
  • listToolsByIntegration - List all tools available for a specific integration
  • listConfiguredIntegrations - List integrations configured on this SDK client (local-only, no server call)

Examples

List All Providers

// List all available providers on the MCP server
const result = await client.server.listAllProviders();

console.log("All providers:", result);

List Tools for an Integration

// List all available GitHub tools
const result = await client.server.listToolsByIntegration({
  integration: "github",
});

console.log("GitHub tools:", result);

Discover Available Integrations

You can use this tool to discover what tools are available for any integration:

// Check what Gmail tools are available
const gmailTools = await client.server.listToolsByIntegration({
  integration: "gmail",
});

// Check what Notion tools are available
const notionTools = await client.server.listToolsByIntegration({
  integration: "notion",
});

console.log("Gmail tools:", gmailTools);
console.log("Notion tools:", notionTools);

List Configured Integrations

Get a list of all integrations configured on your SDK client. This is a local-only operation that doesn't make any server calls:

// Get all configured integrations
const { integrations } = await client.server.listConfiguredIntegrations();

console.log(`Configured ${integrations.length} integrations:`);
integrations.forEach((integration) => {
  console.log(`- ${integration.name} (${integration.id})`);
  console.log(`  Tools: ${integration.tools.length}`);
  console.log(`  OAuth: ${integration.hasOAuth ? 'Yes' : 'No'}`);
  if (integration.scopes) {
    console.log(`  Scopes: ${integration.scopes.join(', ')}`);
  }
});

Response format:

{
  integrations: [
    {
      id: "github",
      name: "GitHub",
      tools: ["github_create_issue", "github_list_repos", ...],
      hasOAuth: true,
      scopes: ["repo", "user"],
      provider: "github"
    },
    {
      id: "gmail",
      name: "Gmail",
      tools: ["gmail_send_email", "gmail_list_messages", ...],
      hasOAuth: true,
      scopes: ["gmail.readonly"],
      provider: "gmail"
    }
  ]
}

Dynamic Tool Discovery

Use this tool to dynamically discover available tools at runtime:

async function getIntegrationTools(integrationName: string) {
  try {
    const result = await client.server.listToolsByIntegration({
      integration: integrationName,
    });
    return result;
  } catch (error) {
    console.error(`Failed to get tools for ${integrationName}:`, error);
    return null;
  }
}

// Use it to discover tools
const githubTools = await getIntegrationTools("github");
const gmailTools = await getIntegrationTools("gmail");

Error Handling

try {
  const result = await client.server.listToolsByIntegration({
    integration: "github",
  });
  console.log("Tools:", result);
} catch (error) {
  if (error.message.includes("not found")) {
    console.error("Integration not found");
  } else if (error.message.includes("authentication")) {
    console.error("Authentication required");
  } else {
    console.error("Unexpected error:", error);
  }
}

Next Steps

On this page