Skip to main content
Solved

A 400 status code error occurs when using the Figma plugin with Claude Code.

  • June 12, 2026
  • 6 replies
  • 174 views

mr.a

API Error: 400 Invalid JSON schema: regex lookaround is not supported. Found at $.properties.fileKey.pattern.

 

I am using Claude Code with the company's proxy API key to invoke a Figma plugin for frontend development. It was working fine yesterday, but today, calling the Figma plugin triggers the exception shown above.

I’d like to know if anyone has encountered this situation before—is this an issue thrown by the Figma plugin, or is it a problem with the intermediary API key I’m using?

Best answer by adamsmasher

Hey again, ​@mr.a and ​@Benjamín Mármol! Are you still seeing this error message?

 

Our team was working on changes on our side to resolve this issue. If you haven’t tried since reporting the issue, can you test again and let me know if you are still getting that response? Thanks!

6 replies

adamsmasher
Figmate
  • Figmate
  • June 14, 2026

Hi, ​@mr.a. Thanks for your post! I can see why this is puzzling given it was working before.

 

So I best know where to take this issue, could you let me know a bit more information:

  • Which specific Figma plugin are you using, and do you know its version?
  • Are you using the official Figma MCP plugin, or a third-party one?

 

Also, have you been using this daily or had it been a few days since last using it? That’ll help me narrow down when any possible changes were made that could be related to this issue. Thanks so much!


mr.a
  • Author
  • New Member
  • June 15, 2026

@adamsmasher 

Got it. I’m using the `figma @ claude-plugins-official` plugin—installed from the Claude Code plugin marketplace—version 2.2.50.

The issue started occurring on the morning of June 15, 2026; prior to that, I had been using it practically every day.


Benjamín Mármol

I’m seeing the same issue from OpenCode with an OpenAI-compatible provider.

The Figma MCP server exposes a `fileKey` JSON Schema pattern that uses a negative lookahead:

 

```json
"pattern": "^(?!undefined$|null$)"

```


OpenAI-compatible structured output / tool schema validators reject regex lookarounds, so the request fails before any Figma tool is called. In our case, even a simple non-Figma prompt fails as soon as the Figma MCP server is enabled.

Error:
Invalid JSON schema: regex lookaround is not supported. Found at $.properties.fileKey.pattern.

Environment:
- MCP server: https://mcp.figma.com/mcp
- Client: OpenCode
- Provider: OpenAI-compatible API
- Impact: Figma MCP must be disabled entirely, because the schema is sent with every request.

Suggested fix: replace the lookaround with an OpenAI-compatible schema, for example:

```

{
  "type": "string",
  "minLength": 1,
  "pattern": "^[A-Za-z0-9_-]+$"
}

```


Or remove the regex constraint and validate undefined / null at runtime.


adamsmasher
Figmate
  • Figmate
  • June 18, 2026

Thanks so much, ​@mr.a and ​@Benjamín Mármol! I’ve taken the details both of you provided and asked internally for more information. I’ll reply again once I’ve heard back with more information. Let me know if anything changes for you as well! Thanks again for posting about this and for your patience.


adamsmasher
Figmate
  • Figmate
  • Answer
  • June 26, 2026

Hey again, ​@mr.a and ​@Benjamín Mármol! Are you still seeing this error message?

 

Our team was working on changes on our side to resolve this issue. If you haven’t tried since reporting the issue, can you test again and let me know if you are still getting that response? Thanks!


mr.a
  • Author
  • New Member
  • June 29, 2026

That error stopped appearing last week, and I’ve been able to use it normally since then. Thank you. ​@adamsmasher