KintsugiKintsugi
Model Context Protocol (MCP)

Integration Guide

This guide walks you through setting up Kintsugi MCP in your development environment. Once configured, your AI coding assistant can search Kintsugi's docs and the live OpenAPI spec directly, so it writes integration code against the current API instead of a stale copy of the reference.

Prerequisites

Choose an MCP-capable AI coding assistant:

  • Cursor IDE (recommended - built-in MCP support)
  • Claude Desktop (for general API help)
  • VS Code (through GitHub Copilot Chat's agent mode, or another MCP-capable extension)

MCP doesn't need your API key. The Kintsugi MCP server only reads public Kintsugi docs and the OpenAPI spec — it never proxies calls to the API and never sees your credentials. You'll need an API key and Organization ID later, when you run the code your assistant generates against the real API. See Creating and Managing API Keys when you're ready.

Cursor IDE Setup

Cursor has built-in MCP support. Configuration is a JSON file — there's no wizard.

Create or open the Cursor MCP config

Cursor reads MCP servers from two places (both use the same schema):

  • Global: ~/.cursor/mcp.json — available in every project
  • Per-project: .cursor/mcp.json in the project root

Create the file if it doesn't exist. You can also open it from Cursor Settings → Tools & MCPs.

Add the Kintsugi MCP server
{
  "mcpServers": {
    "kintsugi": {
      "url": "https://docs.trykintsugi.com/mcp",
      "headers": {
        "X-API-KEY": "your-api-key",
        "X-ORGANIZATION-ID": "your-org-id"
      }
    }
  }
}

If the file already has other servers, add kintsugi alongside them inside the existing mcpServers object.

Reload Cursor

Cursor picks up changes to mcp.json on save. If it doesn't, restart Cursor.

Verify setup

Open Cursor's AI chat and ask:

  • "What Kintsugi API endpoints are available for tax estimation?"
  • "Show me the request format for creating a transaction"

The assistant should search the Kintsugi docs via MCP and cite real endpoints.

Using Kintsugi MCP in Cursor

Once configured, here's how to use it:

You: "Generate code to calculate tax using Kintsugi API"

Cursor: Searches Kintsugi's docs via MCP, finds POST /v1/tax/estimate, and generates working code with the correct request format and headers.

Claude Desktop Setup

Claude Desktop supports remote MCP servers from the config file below. If you're on an older version of Claude Desktop, you may need to run claude mcp add from the CLI or wrap the server with the mcp-remote proxy instead.

Locate Config File

Find your Claude Desktop configuration file:

~/Library/Application Support/Claude/claude_desktop_config.json

Edit Configuration

Open the config file and add Kintsugi MCP:

{
  "mcpServers": {
    "kintsugi": {
      "url": "https://docs.trykintsugi.com/mcp",
      "headers": {
        "X-API-KEY": "your-api-key",
        "X-ORGANIZATION-ID": "your-org-id"
      }
    }
  }
}

If the file doesn't exist, create it with this structure. If it already has mcpServers, add kintsugi to the existing object.

Restart Claude Desktop

Close and reopen Claude Desktop so it re-reads the config file.

Test the integration

Ask Claude: "What Kintsugi API endpoints can help me build a checkout integration?"

Claude should search the Kintsugi docs and cite real endpoints.

VS Code Setup

VS Code has built-in MCP support through GitHub Copilot Chat (agent mode). If you use a different chat extension with MCP support, the same JSON works.

Add the Kintsugi MCP server

Create .vscode/mcp.json in your project:

{
  "servers": {
    "kintsugi": {
      "type": "http",
      "url": "https://docs.trykintsugi.com/mcp",
      "headers": {
        "X-API-KEY": "your-api-key",
        "X-ORGANIZATION-ID": "your-org-id"
      }
    }
  }
}

Or add the same block under "mcp" in your VS Code user settings.json if you want it available in every workspace.

VS Code's MCP config uses servers (not mcpServers) and adds a type field. That's a VS Code quirk — Cursor and Claude Desktop use the shape shown further up.

Ask Copilot Chat

Open Copilot Chat, switch to Agent mode, and ask: "What Kintsugi endpoints are available for tax estimation?" Copilot will call into MCP to answer.

Custom MCP Client Setup

For advanced use cases, you can build your own MCP client on top of the official SDK.

Basic MCP Client Example

The Kintsugi MCP server speaks Streamable HTTP and exposes one tool per Customer API operation, named after its reference page (create-transaction, get-transactions, and so on). Each tool calls the API with the key you send in the connection headers.

import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';

const transport = new StreamableHTTPClientTransport(
  new URL('https://docs.trykintsugi.com/mcp'),
  {
    requestInit: {
      headers: {
        'X-API-KEY': process.env.KINTSUGI_API_KEY,
        'X-ORGANIZATION-ID': process.env.KINTSUGI_ORGANIZATION_ID,
      },
    },
  }
);

const client = new Client({
  name: 'kintsugi-dev-tool',
  version: '1.0.0',
});

await client.connect(transport);

// Discover what the server exposes
const { tools } = await client.listTools();
console.log('Tools:', tools.map((t) => t.name));
// -> ['search_kintsugi', 'query_docs_filesystem_kintsugi']

// Search the docs (returns matching pages with links and excerpts)
const result = await client.callTool({
  name: 'search_kintsugi',
  arguments: { query: 'POST /v1/tax/estimate request schema' },
});
console.log(result);

Integrating into Development Tools

You can build on Kintsugi MCP to power:

  • Code generators - Pull the current spec at build time and regenerate clients
  • API testing tools - Auto-generate test cases from the docs
  • Documentation generators - Mirror the API reference into internal docs
  • Custom IDE plugins - Build specialized tools for your team

Verification and Testing

After setup, verify your MCP integration works correctly.

Test 1: Endpoint discovery

Ask your AI: "What Kintsugi endpoints are available for tax calculation?"

Expected: The assistant lists relevant endpoints like /v1/tax/estimate and cites the docs page it found them on.

Test 2: Code generation

Ask your AI: "Generate Python code to call Kintsugi's tax estimation endpoint"

Expected: Working code with:

  • The correct endpoint URL
  • Both x-api-key and x-organization-id headers
  • Payload fields that match the current schema

Test 3: Schema understanding

Ask your AI: "What's the request schema for creating a transaction in Kintsugi?"

Expected: A field-by-field breakdown pulled from the current OpenAPI spec — required vs. optional, field types, and any enum values.

Test 4: Debugging help

Show code with an error: "Why isn't this working?" (code that's missing required fields)

Expected: The assistant pulls the current schema via MCP and points out the specific fields that are missing or wrong.

Best Practices

Troubleshooting

Next Steps

Ready to Build? Once MCP is configured, ask your AI assistant for any Kintsugi integration and it will pull the current spec to generate the right code.