Skip to main content

Overview

Using Docs in Cursor - Learn how to set up Cursor IDE and MCP with Starkzap documentation

Setting Up LLM Integrations with Starkzap

This guide covers two powerful ways to integrate Starkzap with LLMs: Cursor IDE integration and Model Context Protocol (MCP) setup.

Cursor IDE Setup

Prerequisites

  • Cursor IDE installed on your machine
  • Basic familiarity with Cursor’s interface

Configuration Steps

  1. Open Cursor IDE
  2. Navigate to Settings > Features > Docs
  3. Click on Add new doc
  4. In the URL field, paste the following URL:
    https://docs.starknet.io/llms-full.txt
    

Using Starkzap Documentation in Cursor

Once configured, you can access Starkzap’s documentation directly within Cursor using the following methods:

Method 1: Using @docs Command

Type @docs followed by “Starkzap” to reference the documentation in your code. For example:
// @docs -> Starkzap: How to initialize a wallet connection
const wallet = await sdk.onboard({
  strategy: OnboardStrategy.Privy,
  // ...
});

Method 2: Local Docs MCP Setup

You can also ask questions about Starkzap directly in comments, and Cursor will use the documentation to provide relevant answers and code suggestions.

Example Usage

Here are some examples of how to use the documentation in Cursor: Initializing the SDK:
// @docs -> Starkzap: SDK initialization and configuration
import { StarkZap } from "starkzap";

const sdk = new StarkZap({
  network: "mainnet",
});
Connecting a Wallet:
// @docs -> Starkzap: Wallet connection with Privy
const accessToken = await privy.getAccessToken();

const onboard = await sdk.onboard({
  strategy: OnboardStrategy.Privy,
  privy: {
    resolve: async () => {
      const walletRes = await fetch("https://your-api.example/api/wallet/starknet", {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          Authorization: `Bearer ${accessToken}`,
        },
      });
      const { wallet } = await walletRes.json();

      return {
        walletId: wallet.id,
        publicKey: wallet.publicKey,
        serverUrl: "https://your-api.example/api/wallet/sign",
      };
    },
  },
});
Executing Transactions:
// @docs -> Starkzap: Transaction execution and batching
const tx = await wallet.execute([call]);
await tx.wait();

Benefits

  • Faster Development - Get instant answers without leaving your IDE
  • Accurate Code Suggestions - LLM uses official documentation for context
  • Reduced Errors - Documentation-backed code examples
  • Better Understanding - Learn as you code with inline documentation

Next Steps