npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@locofy/mcp

v1.1.9

Published

Locofy MCP Server with Cursor

Readme

Locofy MCP Server

Locofy MCP (Model Context Protocol) allows Locofy.ai code to be integrated and extended with other AI code editors like Cursor. It not only improves the accuracy and relevance of generated code but also unlocks new possibilities for utilizing Locofy-generated frontend code more effectively.

Tools

  1. getLatestComponentAndDependencyCode
  • Scans directories to retrieve components and dependencies, comparing with current IDE code to offer intelligent updates. Prompts for user confirmation when code changes are detected.
  • Inputs:
    • componentNames (array of string): The list of component or screen names to be retrieved
    • workspacePath (string): The full path to the workspace
  • Returns: JSON object containing component code, dependencies, and change status indicating which files need updates
  1. getLatestFileCode
  • Retrieves individual file contents without component dependency management. Focuses on specific files by name rather than handling components as complete units with dependencies.
  • Inputs:
    • fileNames (array of string): List of specific file names to retrieve
    • workspacePath (string): The full path to the workspace
  • Returns:
    • JSON object containing file code and change status indicating which files need updates

Getting Started with Locofy MCP

To get started with Locofy MCP, follow these steps:

  1. Open the Locofy plugin in Figma and create a project, if not created already.
  2. Convert your designs to code using Locofy. Make sure you have optimised your Figma designs correctly beforehand for high quality code.
  3. Sync your designs to Locofy Builder.
  4. Finally, generate your MCP tokens & start using it in your IDE.

NOTE: Always sync your designs to Locofy Builder before pulling code using MCP.

Generating MCP Token

To configure MCP for your project, follow these steps:

  1. Go to Locofy Dashboard and select the Locofy project for which you want to enable MCP.
  2. Next, click on the gear icon to go to the project settings.
  3. Locate the MCP Configuration tab.

dashboard

  1. Choose the desired token expiry option:
    • 1 Month Expiry
    • No Expiry

5.Click the Generate Token button and copy the mcp.json file.

You can now use this in any IDE that supports MCP servers.

Using Locofy MCP in Cursor

To use the mcp.json file generated above in Cursor, first we need to configure it as a server in Cursor before we start to use it.

Setting up Locofy MCP

  1. In your project’s root directory, create a .cursor folder if it doesn’t already exist.
  2. Save the copied configuration file inside .cursor as mcp.json.
  3. Next, go to Cursor settings and click on MCP tab.

mcp config

  1. Click on the MCP tab & you will find Locofy server as an option.
  2. Click "Disabled" to enable the server. It can take a few seconds to start the server.

NOTE: Hit the refresh icon next to the "Disabled" button if the server is not enabled after a couple of seconds.

Using Locofy MCP

  1. Go to any of your code files and open Cursor chat. You can also shortcut ⌘ + I to open it.
  2. Make sure you're using Agent mode and not in Ask or Edit mode in chat.
  3. You can now directly pull code from Locofy using natural language. You can also customise the code using the power of LLMs. For example:
    • "Fetch the NavigationBar component from Locofy."
    • "Pull Homepage from Locofy & replace the navbar with the one present in this project."
    • "Get ListingCard component from Locofy & merge it with my code."
  4. Locofy will provide you with two tools to pull the code. Click on "Run tool" to execute the function required by the LLM to process your prompt.
    • getLatestComponentAndDependencyCode: Retrieve code along with their dependencies, including any required components, styling files such as CSS, and other related assets to ensure seamless integration.
    • getLatestFileCode: Retrieves specific files by name without their dependencies, making it useful when you need only a particular file's content.

Regenerating MCP Token

If your MCP token has expired or you need to generate a new one, follow these steps:

  1. Go to the Locofy Dashboard and select the project for which you need to regenerate the MCP token.
  2. Click on the geanr icon to access Project Settings.
  3. Navigate to the MCP Configuration tab.
  4. Click the Regenerate Token button to invalidate the previous token and create a new one.
  5. A popup will open where you can choose the desired token expiry option of your new tokens and confirm the decision to revoke existing one.
  6. Click Regenerate Token and download the updated mcp.json file.
  7. Replace the old mcp.json file in your project with the newly generated one.

Your new MCP token is now active, ensuring continued access to Locofy MCP.

More Resources

For more information about Locofy and MCP, visit our official documentation.