Warpcast MCP Server

Warpcast MCP Server

A Model Context Protocol server that allows Claude to interact with Warpcast accounts, enabling actions like posting casts, reading content, searching by keywords, and managing channel interactions through natural language.

zhangzhongnan928

Social Media
Communication
JavaScript
Visit Server

README

Warpcast MCP Server

A Model Context Protocol (MCP) server for Warpcast integration that allows you to use Claude to interact with your Warpcast account.

Features

  • Post casts to your Warpcast account
  • Read casts from Warpcast
  • Search casts by keyword or hashtag
  • Browse and interact with channels
  • Follow/unfollow channels
  • Get trending casts

Setup

  1. Clone this repository

    git clone https://github.com/zhangzhongnan928/mcp-warpcast-server.git
    cd mcp-warpcast-server
    
  2. Install dependencies

    npm install
    
  3. Generate API Keys and Configure Authentication

    This MCP server provides a helper script to generate the necessary Ed25519 key pair:

    npm run generate-keys
    

    Follow the prompts to:

    • Generate a random Ed25519 key pair
    • Save the keys to your .env file
    • Get instructions for registering the key with Warpcast

    Alternatively, if you prefer to set things up manually:

    Option 1: Using Signed Key Requests

    1. Generate an Ed25519 key pair
    2. Use the Warpcast Signed Key Request API to ask for permission to sign messages on behalf of your account
    3. Complete the authorization in the Warpcast app

    Here's an example implementation:

    import * as ed from '@noble/ed25519';
    import { mnemonicToAccount, signTypedData } from 'viem/accounts';
    import axios from 'axios';
    
    // Generate a keypair
    const privateKey = ed.utils.randomPrivateKey();
    const publicKeyBytes = await ed.getPublicKey(privateKey);
    const key = '0x' + Buffer.from(publicKeyBytes).toString('hex');
    
    // EIP-712 domain and types for SignedKeyRequest
    const SIGNED_KEY_REQUEST_VALIDATOR_EIP_712_DOMAIN = {
      name: 'Farcaster SignedKeyRequestValidator',
      version: '1',
      chainId: 10,
      verifyingContract: '0x00000000fc700472606ed4fa22623acf62c60553',
    };
    
    const SIGNED_KEY_REQUEST_TYPE = [
      { name: 'requestFid', type: 'uint256' },
      { name: 'key', type: 'bytes' },
      { name: 'deadline', type: 'uint256' },
    ];
    
    // Generate a Signed Key Request signature
    const appFid = process.env.APP_FID;
    const account = mnemonicToAccount(process.env.APP_MNEMONIC);
    
    const deadline = Math.floor(Date.now() / 1000) + 86400; // signature is valid for 1 day
    const signature = await account.signTypedData({
      domain: SIGNED_KEY_REQUEST_VALIDATOR_EIP_712_DOMAIN,
      types: {
        SignedKeyRequest: SIGNED_KEY_REQUEST_TYPE,
      },
      primaryType: 'SignedKeyRequest',
      message: {
        requestFid: BigInt(appFid),
        key,
        deadline: BigInt(deadline),
      },
    });
    
    // Create a Signed Key Request
    const warpcastApi = 'https://api.warpcast.com';
    const { token, deeplinkUrl } = await axios
      .post(`${warpcastApi}/v2/signed-key-requests`, {
        key,
        requestFid: appFid,
        signature,
        deadline,
      })
      .then((response) => response.data.result.signedKeyRequest);
    
    console.log('Deep link URL:', deeplinkUrl);
    console.log('Open this URL on your mobile device with Warpcast installed to authorize this key');
    

    Option 2: Using an Existing App Key

    If you already have an App Key set up for your Farcaster account, you can use the FID, private key, and public key directly.

  4. Build the server

    npm run build
    
  5. Configure Claude for Desktop to use this server

Configuration with Claude for Desktop

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "warpcast": {
      "command": "node",
      "args": [
        "/absolute/path/to/mcp-warpcast-server/build/index.js"
      ],
      "env": {
        "WARPCAST_FID": "your_fid_here",
        "WARPCAST_PRIVATE_KEY": "your_private_key_here",
        "WARPCAST_PUBLIC_KEY": "your_public_key_here"
      }
    }
  }
}

Replace /absolute/path/to/mcp-warpcast-server with the actual absolute path to where you cloned this repository, and update the environment variables with your actual credentials.

Usage

Once configured, you can ask Claude to:

  • "Post a cast about [topic]"
  • "Read the latest casts from [username]"
  • "Search for casts about [topic]"
  • "Show me trending casts on Warpcast"
  • "Show me popular channels on Warpcast"
  • "Get casts from the [channel] channel"
  • "Follow the [channel] channel for me"

Available Tools

This MCP server provides several tools that Claude can use:

  1. post-cast: Create a new post on Warpcast (max 320 characters)
  2. get-user-casts: Retrieve recent casts from a specific user
  3. search-casts: Search for casts by keyword or phrase
  4. get-trending-casts: Get the currently trending casts on Warpcast
  5. get-all-channels: List available channels on Warpcast
  6. get-channel: Get information about a specific channel
  7. get-channel-casts: Get casts from a specific channel
  8. follow-channel: Follow a channel
  9. unfollow-channel: Unfollow a channel

Authentication Notes

This server uses Warpcast's App Key authentication method, which requires an Ed25519 key pair registered with your Farcaster account. The authentication flow is:

  1. Create a header containing your FID and public key
  2. Create a payload with an expiration time
  3. Sign the header and payload using your private key
  4. Use the resulting token for API calls

In production applications, it's recommended to use the official Farcaster SDK for generating authentication tokens.

Security Considerations

  • Keep your private key secure and never share it
  • Consider rotating your keys periodically
  • The server logs authentication errors to help with debugging

Troubleshooting

If you encounter issues:

  1. Check that your environment variables are set correctly
  2. Ensure your keys are properly registered with your Farcaster account
  3. Check Claude for Desktop logs for any errors
  4. Verify that your Warpcast account has the necessary permissions

License

MIT

Recommended Servers

graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
Apple MCP Server

Apple MCP Server

Enables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.

Featured
Local
TypeScript
Supabase MCP Server

Supabase MCP Server

A Model Context Protocol (MCP) server that provides programmatic access to the Supabase Management API. This server allows AI models and other clients to manage Supabase projects and organizations through a standardized interface.

Featured
JavaScript
@kazuph/mcp-gmail-gas

@kazuph/mcp-gmail-gas

Model Context Protocol server for Gmail integration. This allows Claude Desktop (or any MCP client) to interact with your Gmail account through Google Apps Script.

Featured
JavaScript
MCP Server Trello

MCP Server Trello

Facilitates interaction with Trello boards via the Trello API, offering features like rate limiting, type safety, input validation, and error handling for seamless management of cards, lists, and board activities.

Featured
TypeScript
Metabase MCP Server

Metabase MCP Server

Enables AI assistants to interact with Metabase databases and dashboards, allowing users to list and execute queries, access data visualizations, and interact with database resources through natural language.

Featured
JavaScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Airtable MCP Server

Airtable MCP Server

A Model Context Protocol server that provides tools for programmatically managing Airtable bases, tables, fields, and records through Claude Desktop or other MCP clients.

Featured
JavaScript
@wopal/mcp-server-hotnews

@wopal/mcp-server-hotnews

A Model Context Protocol server that provides real-time hot trending topics from major Chinese social platforms and news sites.

Featured