Using TinyFn MCP with Windsurf IDE

Windsurf IDE's Cascade AI assistant is powerful, but it can struggle with precise calculations, validations, and encodings. This guide shows you how to supercharge Windsurf with TinyFn's 500+ deterministic tools via MCP.

Windsurf MCP Support

Windsurf IDE, developed by Codeium, includes built-in support for the Model Context Protocol (MCP). This allows Cascade, Windsurf's AI assistant, to access external tools during coding sessions.

With MCP integration, Cascade can:

  • Call external APIs for precise calculations
  • Validate data formats using RFC-compliant validators
  • Generate hashes, UUIDs, and encoded strings
  • Convert between units and formats
  • Process JSON, dates, and other structured data
Why this matters: Without tools, Cascade might generate a UUID that looks valid but isn't, or compute a hash incorrectly. With TinyFn MCP, it calls real functions that return correct results.

Configuration Steps

Step 1: Get Your TinyFn API Key

If you don't have one yet, sign up at tinyfn.io to get your free API key.

Step 2: Open Windsurf Settings

In Windsurf, open the Command Palette (Cmd+Shift+P on Mac or Ctrl+Shift+P on Windows/Linux) and search for "Windsurf Settings" or navigate to File > Preferences > Windsurf Settings.

Step 3: Configure MCP Server

Find the MCP configuration section and add TinyFn as a server:

Windsurf MCP Configuration
{
  "mcpServers": {
    "tinyfn": {
      "url": "https://api.tinyfn.io/mcp/all/",
      "headers": {
        "X-API-Key": "your-api-key-here"
      }
    }
  }
}

Step 4: Restart Windsurf

After saving the configuration, restart Windsurf to load the MCP tools. You should see TinyFn tools available in Cascade's tool list.

Alternative: Category-Specific Endpoints

If you want to limit which tools are available, use category-specific endpoints:

Category-Specific Configuration
{
  "mcpServers": {
    "tinyfn-dev": {
      "url": "https://api.tinyfn.io/mcp/encode/",
      "headers": { "X-API-Key": "your-api-key" }
    },
    "tinyfn-hash": {
      "url": "https://api.tinyfn.io/mcp/hash/",
      "headers": { "X-API-Key": "your-api-key" }
    },
    "tinyfn-validate": {
      "url": "https://api.tinyfn.io/mcp/validate/",
      "headers": { "X-API-Key": "your-api-key" }
    }
  }
}

Available Tools

Here are the most useful TinyFn tools for coding workflows in Windsurf:

Encoding & Decoding

Tool Description Use Case
encode/base64 Encode string to Base64 API payloads, data URIs
decode/base64 Decode Base64 string Reading encoded data
encode/url URL encode a string Query parameters
decode/jwt Decode JWT payload Debugging auth tokens

Hashing & Security

Tool Description Use Case
hash/sha256 Generate SHA-256 hash File integrity, passwords
hash/md5 Generate MD5 hash Checksums, cache keys
generate/uuid Generate UUID v4 Database IDs, unique keys
generate/password Generate secure password Test data, configs

JSON & Data

Tool Description Use Case
json/validate Validate JSON syntax Config files, API responses
json/prettify Format JSON with indentation Readable output
json/minify Compress JSON Reduce payload size

Workflow Examples

Example 1: Generating Test Data

Prompt to Cascade
Create a test user object with a valid UUID,
a SHA-256 hashed password, and today's timestamp in ISO format.

With TinyFn MCP, Cascade will call the appropriate tools:

Cascade's Response
// Using generate/uuid, hash/sha256, and datetime/now tools

const testUser = {
  id: "f47ac10b-58cc-4372-a567-0e02b2c3d479",  // Real UUID from tool
  passwordHash: "5e884898da28047d9166957...",   // Real SHA-256 hash
  createdAt: "2025-01-30T14:32:15.000Z"         // Actual timestamp
};

Example 2: Validating API Input

Prompt to Cascade
Write a function that validates this JSON config
and checks if the email is valid:
{"email": "test@example.com", "count": 5}
Cascade's Response
// First, let me verify the JSON is valid...
// Using json/validate: ✓ Valid JSON

// Now checking the email format...
// Using validate/email: ✓ "test@example.com" is valid

function validateConfig(config) {
  // JSON already validated as structurally correct
  // Email validated as RFC 5322 compliant
  return {
    valid: true,
    email: config.email,
    count: config.count
  };
}

Example 3: Working with Timestamps

Prompt to Cascade
Convert the Unix timestamp 1706627535 to a readable date
and calculate how many days ago it was.
Cascade's Response
// Using datetime/from-unix and datetime/diff tools

The timestamp 1706627535 corresponds to:
January 30, 2024 at 2:32:15 PM UTC

That was exactly 365 days ago from today.

Tips for Best Results

  1. Be specific in prompts: Mention when you need "real" or "valid" values. Cascade will know to use tools instead of generating fake data.
  2. Ask for verification: Phrases like "validate this JSON" or "check if this email is valid" trigger tool usage.
  3. Request precise formats: "Give me the exact SHA-256 hash" signals that Cascade should use a tool, not guess.
  4. Use for debugging: Ask Cascade to decode JWT tokens or parse timestamps when debugging - it'll use TinyFn for accurate results.

Supercharge Your Windsurf Workflow

Give Cascade the tools it needs for precise, deterministic operations.

Get Free API Key

Ready to try TinyFn?

Get your free API key and start building in minutes.

Get Free API Key