I'm building an MCP server using fastMCP, with Cursor as the MCP client. The server will fetch and process Figma design information.
As we know, a Figma access token is required to make API requests. For a local MCP server, the token can be easily configured like this:
"figma-to-code": { "command": "uv", "args": [ "run", "--with", "fastmcp", "fastmcp", "run", "/Users/xxx/figma_mcp_server.py", "--", "--figma_token", "figd_xxxxx-6iHOMRhSMEXPkPE487VKqG" ], "env": {} } However, I'm unsure how to securely obtain and pass the Figma token for a remote MCP server deployment.
I have reviewed the FastMCP OAuth and Figma OAuth documentation: https://gofastmcp.com/servers/auth/oauth-proxy#token-verification https://developers.figma.com/docs/rest-api/authentication/
The FastMCP OAuth documentation indicates that provider information such as client_id is required. However, I don't think it's a right way to work on the MCP side to achieve my desired workflow. Here is the intended procedure:
- My MCP users will receive a remote MCP server endpoint such as
http://xxx:9000/mcp - They will configure this endpoint in Cursor as follows:
"figma-to-code-http": { "url": "http://10.91.214.50:9000/mcp" } - When they enable the server, Cursor will prompt them to authenticate with Figma
- Upon user consent, the remote MCP server will obtain the access token and function properly