How to Set Up TinyFn MCP with Claude Desktop

Want to give Claude Desktop access to 500+ deterministic tools? This step-by-step guide walks you through setting up TinyFn MCP with Claude Desktop, from getting your API key to testing your first tool call.

What is MCP?

MCP (Model Context Protocol) is an open standard that allows AI assistants like Claude to use external tools. Instead of relying on the AI to perform calculations or validations (which can lead to errors), MCP lets the AI call specialized tools that return accurate, deterministic results.

TinyFn provides an MCP server with 500+ utility tools covering math, string manipulation, conversions, validation, hashing, encoding, and more. When Claude needs to count characters, convert units, or validate an email, it calls the appropriate TinyFn tool instead of guessing.

Why use TinyFn MCP? LLMs frequently make errors on tasks that require precision. Claude might tell you "strawberry" has 2 R's (it has 3), or miscalculate a temperature conversion. TinyFn tools eliminate these errors by providing deterministic, tested results.

Prerequisites

Before you begin, make sure you have:

  • Claude Desktop installed on your computer (available for macOS, Windows, and Linux)
  • A TinyFn account with an API key (free tier available)
  • A text editor to modify the configuration file

Step 1: Get Your TinyFn API Key

If you don't have a TinyFn account yet, sign up at tinyfn.io to get your free API key. The free tier includes 100 requests per month, which is enough to test the integration.

Once you have your API key, keep it handy - you'll need it for the configuration.

Step 2: Locate the Configuration File

Claude Desktop uses a JSON configuration file to manage MCP servers. The location depends on your operating system:

macOS

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

Windows

%APPDATA%\Claude\mcp.json

Linux

~/.config/Claude/mcp.json

If the file doesn't exist, create it. If the directory doesn't exist, create that too.

Step 3: Add TinyFn MCP Configuration

Open the mcp.json file in your text editor and add the TinyFn server configuration:

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

Replace your-api-key-here with your actual TinyFn API key.

Tip: If you already have other MCP servers configured, add the TinyFn entry to the existing mcpServers object instead of replacing the entire file.

Example with Multiple MCP Servers

mcp.json with multiple servers
{
  "mcpServers": {
    "tinyfn": {
      "url": "https://api.tinyfn.io/mcp/all/",
      "headers": {
        "X-API-Key": "your-tinyfn-api-key"
      }
    },
    "another-server": {
      "url": "https://example.com/mcp",
      "headers": {
        "Authorization": "Bearer token"
      }
    }
  }
}

Step 4: Restart Claude Desktop

After saving the configuration file, you need to restart Claude Desktop for the changes to take effect:

  1. Quit Claude Desktop completely (not just close the window)
  2. Wait a few seconds
  3. Reopen Claude Desktop

Claude will now load the TinyFn MCP server and have access to all 500+ tools.

Step 5: Test the Connection

To verify the setup is working, try asking Claude a question that requires precise calculation. Here are some good test prompts:

Test 1: Character Counting

How many R's are in the word "strawberry"?

If TinyFn is connected, Claude should use the string/count-char tool and correctly answer "3".

Test 2: Temperature Conversion

Convert 98.6 degrees Fahrenheit to Celsius.

Claude should use the convert/fahrenheit-to-celsius tool and return exactly 37.0 degrees Celsius.

Test 3: Email Validation

Is "test@example.com" a valid email address?

Claude should use the validate/email tool to verify the format.

When Claude uses a TinyFn tool, you'll see a "Tool Call" indicator in the response showing which tool was called and the result returned.

Troubleshooting Common Issues

Issue: Tools not appearing

Symptoms: Claude doesn't seem to use TinyFn tools even when prompted.

Solutions:

  • Verify the mcp.json file is valid JSON (no trailing commas, proper quotes)
  • Make sure you've completely restarted Claude Desktop
  • Check that your API key is correct and active
  • Try explicitly asking Claude to "use TinyFn" for a calculation

Issue: JSON parsing error

Symptoms: Claude Desktop fails to start or shows an error about the configuration.

Solution: Use a JSON validator to check your mcp.json file. Common mistakes include:

  • Trailing commas after the last item in an object or array
  • Using single quotes instead of double quotes
  • Missing closing braces or brackets

Issue: Authentication errors

Symptoms: Tools fail with "unauthorized" or "invalid API key" errors.

Solutions:

  • Verify your API key is correct (no extra spaces or characters)
  • Check that your TinyFn account is active at tinyfn.io/dashboard
  • Ensure you haven't exceeded your monthly request limit

Issue: Rate limiting

Symptoms: Tools work sometimes but fail with "rate limit exceeded".

Solution: The free tier has a limit of 10 requests per minute. If you're hitting this limit, consider upgrading to the Starter plan ($5/month) for 100 requests per minute.

Advanced Configuration

Using Specific Tool Categories

Instead of loading all 500+ tools, you can configure TinyFn to only expose specific categories. This can improve Claude's tool selection accuracy:

mcp.json - Math tools only
{
  "mcpServers": {
    "tinyfn-math": {
      "url": "https://api.tinyfn.io/mcp/math/",
      "headers": {
        "X-API-Key": "your-api-key"
      }
    }
  }
}

Available Category Endpoints

Endpoint Description
/mcp/all All 500+ tools
/mcp/math Math operations (prime, factorial, GCD, etc.)
/mcp/string String manipulation (count, reverse, slug, etc.)
/mcp/convert Unit conversions (temperature, length, weight)
/mcp/validate Validation (email, URL, phone, UUID)
/mcp/hash Hashing (SHA256, MD5, HMAC)
/mcp/encode Encoding (Base64, URL, HTML)
/mcp/datetime Date and time operations
/mcp/stats Statistics (mean, median, variance)

Multiple Category Configuration

You can configure multiple TinyFn endpoints for different categories:

mcp.json - Multiple categories
{
  "mcpServers": {
    "tinyfn-math": {
      "url": "https://api.tinyfn.io/mcp/math/",
      "headers": { "X-API-Key": "your-api-key" }
    },
    "tinyfn-string": {
      "url": "https://api.tinyfn.io/mcp/string/",
      "headers": { "X-API-Key": "your-api-key" }
    },
    "tinyfn-validate": {
      "url": "https://api.tinyfn.io/mcp/validate/",
      "headers": { "X-API-Key": "your-api-key" }
    }
  }
}

Ready to Get Started?

Get your free TinyFn API key and give Claude Desktop access to 500+ deterministic tools.

Get Free API Key

Ready to try TinyFn?

Get your free API key and start building in minutes.

Get Free API Key