πŸš€ Figma MCP Server + Augment Code Integration

by shedytee

321 downloads
Not rated
GitHub

About

Example integration of a Figma MCP server with Augment Code, using Node.js and figma-js.

Details

Author
shedytee
Downloads
321
Categories
Media

- Query Figma files via an MCP‑compatible interface
- Integrates directly into Augment Code as a custom tool
- Uses @modelcontextprotocol/sdk, figma-js, zod, and dotenv
- Includes ready‑to‑use example prompts in prompts.md
- Works with any Figma design file

Clone the repository, install dependencies with npm install, and configure environment variables (FIGMA_TOKEN, FIGMA_FILE_ID, MCP_PORT) in a .env file. Run the server with npm run start:mcp, then add a new MCP server in Augment Code’s workspace settings with the command pointing to figma-mcp-server.js and the same environment variables set.

πŸš€ Figma MCP Server + Augment Code Integration

GitHub license
GitHub issues
GitHub stars

This project shows how to connect a Model Context Protocol (MCP) server to the Figma API and integrate it with Augment Code to supercharge your development workflow.

---

✨ Features

βœ… Builds an MCP server that:
- Queries Figma files
- Exposes Figma data to an MCP-compatible interface
- Integrates directly into Augment Code as a custom tool

βœ… Uses:
- @modelcontextprotocol/sdk
- figma-js
- zod
- dotenv

---

πŸ“¦ Setup Instructions

1. Clone the repository

   git clone https://github.com/shedytee/mcp-figma-augmentcode-integration.git
   cd mcp-figma-augmentcode-integration
   

2. Install dependencies

   npm install
   

3. Configure environment variables

Copy the example file and fill in your values:

   cp .env.example .env
   

Set:
- FIGMA_TOKEN β†’ your Figma API token
- FIGMA_FILE_ID β†’ your Figma file ID
- MCP_PORT β†’ usually 3000

4. Run the MCP server

   npm run start:mcp
   

You should see:

   MCP Server running on port 3000

---

βš™οΈ Connect to Augment Code

1. Open Augment Code β†’ Workspace Settings β†’ MCP
2. Add a new MCP server:
- Name: figma
- Command:

     node "C:/path/to/your/project/figma-mcp-server.js"

3. Add environment variables in Augment Code:
- FIGMA_TOKEN
- FIGMA_FILE_ID
- MCP_PORT

4. Restart Augment Code to apply the changes.

---

πŸ’¬ Example Prompts

See prompts.md for ready-to-use chat prompts.

Examples:
- Ask figma to get the full file data.
- Use figma to fetch the latest file from the Figma API.
- Ask figma for details about the component named ButtonPrimary.
- Use the figma tool to show all components in the design file.

---

πŸ—‚ Example Code

This repo includes figma-mcp-server.js,
a working example of the MCP server wired to the Figma API.

To run:

npm run start:mcp

---

⚠ Important Notes

πŸ›‘οΈ Watch for directory names with spaces

If your project directory contains spaces (like Moments Platform),
you must wrap the script path in quotes in the Augment Code command:

node "C:/Users/yourname/Documents/Dev/Moments Platform/moments-platform/figma-mcp-server.js"

βœ… Recommended β†’ move to a no-space path:

C:/Users/yourname/Documents/Dev/MomentsPlatform/moments-platform/

Then use:

node C:/Users/yourname/Documents/Dev/MomentsPlatform/moments-platform/figma-mcp-server.js

---

πŸ”§ Troubleshooting

See troubleshooting.md for common issues and fixes.

---

πŸ›  Repository Structure

/README.md            β†’ Main guide  
/.env.example         β†’ Example environment config  
/figma-mcp-server.js β†’ MCP server code  
/prompts.md          β†’ Sample prompts for Augment Code  
/troubleshooting.md  β†’ Error guide  
/package.json        β†’ Dependencies and scripts  
/LICENSE             β†’ License

---

🀝 Contributing

Got ideas, improvements, or questions?
Please open an issue or submit a pull request β€” contributions are welcome!

See CONTRIBUTING.md for guidelines.

---

πŸ“„ License

This project is licensed under the MIT License.

---

🌐 Links

- Model Context Protocol (MCP)
- Figma API
- Augment Code

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.