Knit MCP Server - Getting Started

A quick introduction to Knit's MCP Servers and how to get started with them.

Introduction to Model Context Protocol (MCP) Servers

Model Context Protocol (MCP) Servers enable AI models to access external tools and data through standardized interfaces. They serve as a bridge between language models and various APIs, allowing AI systems to perform tasks beyond their built-in capabilities. For more details on the Model Context Protocol, visit the official MCP documentation.

STDIO vs SSE MCP Servers: Understanding the Difference

STDIO MCP Servers

  • Run locally on your machine
  • Challenging to secure, deploy, and scale
  • Currently the majority of servers being built use STDIO transport
  • Limited for production business environments

SSE (Server-Sent Events) MCP Servers

  • Cloud-hosted solution
  • Offer superior security, scalability, and ease of deployment
  • Better suited for production-grade business applications

Knit's MCP Server Solutions

Knit offers production-ready SSE transport-based servers with the following advantages:

Key Features

  • Cloud-hosted infrastructure
    • Limitless scaling capabilities
    • Robust authorization support (via Bearer tokens)
  • Consolidated API packaging
    • Package APIs from different applications into a single server. No need to run multiple servers for different apps.
    • Example: Build a recruitment agent by combining ATS, Assessment, and Calendar APIs
  • White-labeled embedded solution
    • API-first approach for tools packaging and distribution
    • Streamlined deployment for B2B workloads
  • Extensive tool ecosystem
    • Access to 10,000+ tools across popular applications
    • Categories include HRIS, ATS, CRM, Accounting, Calendar, Meeting, Ticketing, and more

Getting Started with Knit MCP Server

Setting up your Knit MCP Server involves a simple 4-step process:

  1. Find tools you want to include from Knit's extensive catalog
  2. Create a tools package that bundles your selected tools together
  3. Create a Knit MCP Server configured with your package and necessary integrations
  4. Use your server by connecting it to AI models using the proper authentication

Here's a quick about how you can quickly build your Knit MCP Server and use it with any popular MCP Client.


Let's explore these steps in detail:

1. Find Tools for Your Package

You can discover tools by application, use case, entities, or operation type. For more details on finding tools for your workloads, visit our find tools guide.

Click here to see this API's reference.

Example 1: Find tools by app and usecase

curl --location --request GET 'https://api.getknit.dev/v1.0/tools.find' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \
--data '{
    "filters": {
        "app_id": "hubspot",
        "usecase": "get leads"
    }
}'
{
  "success": true,
  "data": [
    {
      "tool_id": "hubspot__get_lead_details_by_id",
      "entities": [
        "lead",
        "association",
        "property"
      ],
      "operation": "read",
      "title": "Get Lead Details by ID",
      "description": "This API endpoint retrieves details of a lead identified by the {leadsId}. The {leadsId} can be the internal object ID or any unique property value specified by the idProperty query parameter. The API allows filtering of returned properties using the properties query parameter and can include property history with propertiesWithHistory. It also supports retrieving associated object IDs with the associations parameter and can filter archived results using the archived parameter. The response includes lead details such as associations, creation and update timestamps, properties, and archived status.",
      "is_unified_tool": false
    },
    {
      "tool_id": "hubspot__post_create_a_lead",
      "entities": [
        "lead",
        "association",
        "property"
      ],
      "operation": "write",
      "title": "Create a Lead",
      "description": "This API endpoint allows you to create a lead with specified properties and associations in HubSpot. The request requires an authorization header with a Bearer token and a content-type header set to application/json. The body of the request includes an array of associations and a properties object, which now includes 'hs_lead_name', 'hs_lead_type', and 'hs_lead_label'. The response returns a copy of the created lead object, including its ID, creation and update timestamps, and properties with history. If there is an error, a detailed error message is provided.",
      "is_unified_tool": false
    },
    // Additional tools omitted for brevity
  ]
}

Example 2: Find unified API tools by category

curl --location --request GET 'https://api.getknit.dev/v1.0/tools.find' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \
--data '{
    "filters": {
        "category_id": "CALENDAR",
        "include_unified_tools": true
    }
}'

Sample Response:

{
  "success": true,
  "data": [
    {
      "tool_id": "unifiedcalendar__update-event",
      "entities": null,
      "operation": "write",
      "title": "Update Calendar Event",
      "description": "The Update Calendar Event API allows users to update an existing calendar event by providing the calendarId and eventId. Users can update details such as the event title, description, start and end times, attendees, and conferencing details. The API supports both all-day and recurring events. The response indicates whether the update was successful or provides an error message if it failed.",
      "is_unified_tool": true
    },
    {
      "tool_id": "unifiedcalendar__get-availability",
      "entities": null,
      "operation": "read",
      "title": "Retrieve Available Common Time Slots for Multiple Attendees",
      "description": "This API is used to retrieve available common time slots for multiple attendees within a specified time range. The request requires the start and end times in ISO 8601 UTC format, a list of attendee email addresses, and optionally the slot duration in minutes. The response includes a list of free time slots available for all attendees. Supported applications include Outlook Calendar and Google Calendar, with a restriction that the gap between start and end should be less than 62 days.",
      "is_unified_tool": true
    },
    {
      "tool_id": "unifiedcalendar__list-calendars",
      "entities": null,
      "operation": "read",
      "title": "List Calendars API",
      "description": "The List Calendars API retrieves all calendars associated with a user, including those they own and those shared with them. It supports apps like Outlook Calendar and Google Calendar. The API requires a 'pageSize' query parameter to control the size of results and an optional 'pageToken' to fetch additional records. The response includes details of each calendar such as id, name, description, timezone, owner information, colors, visibility, reminders, and more.",
      "is_unified_tool": true
    },
    // Additional tools omitted for brevity
  ]
}

Save the relevant tool_id for creating a tools package in the next step.

2. Create a Tools Package

Now that you have searched for the tools you'd want to package, use the below curl to create a tool package to be used by your MCP Server.

In the below curl, name and description can be any arbitrary text you'd want to set. However, include the relevant tool_ids from the find tool result of the previous step in the tools array in request body as shown below.

Click here to see this API's reference.

curl --location --request POST 'https://api.getknit.dev/v1.0/tools.pkg.create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \
--data '{
    "name": "Sales test tools",
    "description": "Sales test tools",
    "tools": [
      "hubspot__get_lead_details_by_id",
      "hubspot__get_read_a_page_of_leads",
      "hubspot__get_read_a_page_of_tasks",
      "hubspot__post_read_batch_tasks",
      "hubspot__get_task_details_by_task_id",
      "hubspot__post_search_crm_tasks",
      "unifiedcalendar__list-events",
      "unifiedcalendar__delete-event",
      "unifiedcalendar__get-event",
      "unifiedcalendar__move-event",
      "unifiedcalendar__update-event",
      "unifiedcalendar__create-event",
      "unifiedcalendar__respond-event"
    ]
}'

Sample Response:

{
  "success": true,
  "data": {
    "orgID": "o_bdVS8xxx3TzqG9xxxXyN9",
    "pkgID": "tp_l9oUkEqEBz7wcEswIJXGh2",
    "tools": [
      "unifiedcalendar__get-event",
      "unifiedcalendar__update-event",
      "hubspot__get_lead_details_by_id",
      "unifiedcalendar__create-event",
      "hubspot__get_task_details_by_task_id",
      "hubspot__get_read_a_page_of_tasks",
      "unifiedcalendar__move-event",
      "unifiedcalendar__delete-event",
      "hubspot__get_read_a_page_of_leads",
      "hubspot__post_search_crm_tasks",
      "unifiedcalendar__respond-event",
      "hubspot__post_read_batch_tasks",
      "unifiedcalendar__list-events"
    ],
    "name": "Sales test tools",
    "description": "Sales test tools",
    "apps": [
      "calendar",
      "hubspot"
    ],
    "updateAt": 1745660614190
  }
}

Store the value of pkgID. You need it in the next step to create your MCP Server.

3. Create Knit's MCP Server for your tools package

Use the pkgID, generated in the previous step, and your user's integration IDs to create an MCP Server for your user.

❗️

You'd need to pass an active integration id for each unique tool set present in the tools package.

For example, in the above package, tools from Knit's unified CALENDAR category and Hubspot CRM app are being used. So, one active integration ID for calendar app and one for Hubspot need to be passed as shown in the curl command below.

See our getting started guide to understand what an Integration ID is and why it is important to have an Integration Id to make API calls on Knit.

Click here to see this API's reference.

curl --location --request POST 'https://api.getknit.dev/v1.0/mcp.server.create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \
--data '{
  "pkgID": "tp_MixTYxbEsnll...",
  "integrationIDs": [
    {
      "appOrCategoryID": "hubspot",
      "integrationID": "mg_MneXkY6pGG..."
    },
    {
      "appOrCategoryID": "CALENDAR",
      "integrationID": "mg_clntx8ZENs..."
    }
  ]
}'

Sample Response:

{
  "success": true,
  "data": {
    "mcpServerID": "dtp_irjiGaQFJbuWbodetB7MFz",
    "serverURL": "https://mcp.getknit.dev/sse"
  }
}

Store the value of mcpServerID. You need to pass this as a header value in the next step.

4. Using Your MCP Server

4.1 Knit MCP Server URL

Knit MCP Server is hosted on https://mcp.getknit.dev/sse. This is the endpoint you'll use when configuring any client to connect to Knit's MCP Server.

4.2 Authentication Headers

Knit's MCP Server authentication headers help with security, multi-tenancy, and logical separation of data and operations, which is essential for embedded integrations. You can choose either one of the following options to pass the headers to Knit's MCP server:

Option 1: Separate Headers

Authorization: Bearer {YOUR_API_KEY}
X-KNIT-MCP-SERVER-ID: {KNIT_MCP_SERVER_ID}

This approach separates your API key from the server identifier, providing clearer separation of authentication components.

Option 2: Combined Header

Authorization: Bearer {YOUR_API_KEY}.{KNIT_MCP_SERVER_ID}

This method combines both identifiers into a single header for simplified implementation.

📘

Replace mcpServerID (begins with "dtp"), generated in the previous step, with {KNIT_MCP_SERVER_ID} for creating your Knit MCP Server.

4.3 Using with Claude Desktop

Claude Desktop only supports STDIO servers by default. To use Knit's SSE-based MCP server with Claude Desktop, you'll need to use the MCP Remote npm package by Cloudflare. Your Claude MCP config JSON file should look like this:

Windows Configuration Example:

{
  "mcpServers": {
    "knit-mcp": {
      "command": "C:\\nvm4w\\nodejs\\node.exe",
      "args": [
        "C:\\nvm4w\\nodejs\\node_modules\\npm\\bin\\npx-cli.js",
        "-y",
        "mcp-remote",
        "https://mcp.getknit.dev/sse",
        "--header",
        "Authorization:Bearer {YOUR_API_KEY}.{KNIT_MCP_SERVER_ID}"
      ]
    }
  }
}

Important: On Windows, make sure to provide absolute paths for node.exe and npx-cli.js as shown in the example above.

Note: Replace {YOUR_API_KEY} with your actual Knit API Key and {KNIT_MCP_SERVER_ID} with your Knit MCP Server ID (generated in step 3).