All posts
Tutorial
··3 min read

Getting Started with Kognyt MCP

A step-by-step guide to installing and configuring Kognyt MCP with Claude Code, Cursor, and VS Code Copilot. From zero to Salesforce intelligence in under a minute.

NG

Nishant Goswami

Kognyt MCP is an MCP (Model Context Protocol) server that gives any AI assistant Salesforce platform knowledge. This guide walks through installation and configuration for the three most popular AI coding tools.

Prerequisites

  • Node.js 18+ — check with node --version
  • An MCP-compatible AI client — Claude Code, Cursor, or VS Code with GitHub Copilot

That's it. No Salesforce org required. No API key for the free tier.

Installation

Kognyt MCP runs via npx, so there's no global install needed:

npx -y @kognyt/salesforce-mcp

This command downloads and starts the MCP server. Your AI client will manage the server lifecycle — you don't need to keep it running manually.

Configuration

Each AI client has a slightly different configuration format. Choose your editor below.

Claude Code

Create or edit .mcp.json in your project root:

{
  "mcpServers": {
    "salesforce": {
      "command": "npx",
      "args": ["-y", "@kognyt/salesforce-mcp"]
    }
  }
}

Cursor

Create or edit .cursor/mcp.json:

{
  "mcpServers": {
    "salesforce": {
      "command": "npx",
      "args": ["-y", "@kognyt/salesforce-mcp"]
    }
  }
}

VS Code (GitHub Copilot)

Create or edit .vscode/mcp.json:

{
  "servers": {
    "salesforce": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@kognyt/salesforce-mcp"]
    }
  }
}

Note the difference: VS Code uses servers instead of mcpServers, and requires a type: "stdio" field.

Verify It Works

After adding the config, restart your AI client. Then try asking your AI assistant something Salesforce-specific:

  • "What are the governor limits for SOQL queries in Apex?"
  • "What's the best practice for writing Apex triggers?"
  • "What changed in the latest Salesforce release?"

Your AI should now provide accurate, contextual answers drawn from Salesforce platform knowledge — not just generic programming advice.

Free Tools (No API Key)

The free tier includes 3 tools, available immediately:

ToolWhat It Does
Constraints & Best PracticesGovernor limits, platform rules, and best practices
Documentation SearchSemantic search over official Salesforce docs
Release IntelligenceRelease metadata, API versions, and platform status

These tools handle up to 100 requests per day with no sign-up required.

Upgrading to Pro

Pro unlocks 7 additional tools and 1,000 requests/day:

  1. Sign up at kognyt.dev/sign-up
  2. Generate an API key at Dashboard > MCP
  3. Add the key to your config:
{
  "mcpServers": {
    "salesforce": {
      "command": "npx",
      "args": ["-y", "@kognyt/salesforce-mcp"],
      "env": {
        "KOGNYT_KEY": "your-api-key"
      }
    }
  }
}

Pro tools include the Apex class library reference, standard object schema, LWC component reference, tribal knowledge (46 production-tested rules), SOQL optimizer, code pattern analyzer, and trigger context advisor.

Troubleshooting

"npx: command not found" — Install Node.js 18+ from nodejs.org.

Server not connecting — Restart your editor after adding the config. Verify the JSON is valid.

Rate limited — Free tier allows 100 requests/day. Upgrade to Pro for 1,000, or wait until the next day.

Next Steps