Start developing on Farcaster with Neynar and AI enabled Cursor
npx @mintlify/mcp@latest add neynar
in your terminal. You will then need to add the MCP server to Cursor.rish/Code/farcaster
. This tutorial assumes you’re starting from scratch. If you already have a build environment, your steps might vary.Version: 0.43.5
, it’s possible that future versions behave slightly differently.farcaster
folder you created in Cursor and then open the right chat pane. That’s the icon next to the icon in the screenshot below. This tutorial assumes you’re using claude-3.5-sonnet
as your AI model. With a different model, your results might differ.I want to build a Farcaster app with Neynar. Neynar’s openapi spec is here: @https://github.com/neynarxyz/OAS/ Neynar’s nodejs sdk is here: @https://github.com/neynarxyz/nodejs-sdk can you help set up the repo for me? we will use the latest version of neynar’s sdk. No need to build a frontend for now, we will focus on backend only to start.Cursor should run a bunch of commands based on the above prompt and set up the directory for you already. The right pane will look something like the one below (it slightly differs on each run, so don’t worry if it’s different for you).
.env
file. Replace the placeholder with your API key directly, no quotes needed.how do I run this?Cursor should give you a set of commands you can run from the chat pane directly. Tap “run” on each command and wait for it to finish running before moving to the next one.
npm
commands above, if you run the curl commands, it should start printing results to your console!neynar-api-client.d.ts
needs to be added to context to suggest suitable solutions (or else it will just make things up!). You can search for the filename to add it easily.