MCP Tool execution fails with OData 401 error - credentials not passed correctly

Hi,

I’ve set up an MCP Server with a tool linked to a FileMaker script. The MCP connection from Claude Code works, but when executing the tool I get:

Failed to make OData call: 401 Unauthorized - {"error":{"code":"212","message":"(212): Invalid account/password"}}

Environment:

• OttoFMS 4.16.1

• FMS 22.0.1

• macOS 26.2 (Apple Silicon M1)

• LAN-only server, self-signed certificate (default FMS cert + mkcert trusted cert tried)

What works:

• Direct OData call to FMS (curl https://localhost/fmi/odata/v4/… with Basic auth) — script runs and returns correct result :white_check_mark:

• OttoFMS OData proxy (/otto/fmi/odata/v4/… with Bearer token from Data API Key) :white_check_mark:

• Data API authentication with the same account/password :white_check_mark:

• MCP connection from Claude Code (-t http) :white_check_mark:

What fails:

• MCP tool execution — OttoFMS’s internal OData call returns 401 :x:

Setup:

• Data API Key created with both Data API and OData enabled

• FileMaker account has fmrest, fmodata, and fmapp extended privileges (Full Access privilege set)

• MCP Server with one tool pointing to a simple test script

• NODE_TLS_REJECT_UNAUTHORIZED=0 set in the OttoFMS launch daemon plist

OttoFMS error log:

Error executing OData MCP tool 'hello': Failed to make OData call: 401 Unauthorized - {"error":{"code":"212","message":"(212): Invalid account/password"}}

It seems like the credentials stored in the Data API Key are not being passed correctly to the internal OData call when executing an MCP tool, even though the same key works fine for external OData proxy requests.

Additional note: I also encountered an “Already connected to a transport” error when the OttoFMS console (browser) had the MCP Servers page open. Closing the browser tab and restarting OttoFMS resolved that.

Any ideas? Thanks!

Hey @bison ,

Is this a new error after upgrading to 4.16? I’ll look into the transport error, I’m getting that as well in my testing.

I’ll test further and see if I can get a fix out this week.

-Kyle

Hi Kyle, thanks for the quick response!
I installed OttoFMS 4.16.1 for the first time on Feb 27, so unfortunately I can’t confirm whether this worked on earlier versions.
I can only say the error exists on 4.16.1.
Let me know if there’s anything I can test on my end to help. Thanks!
-Bison

Hey @bison ,

Sorry for the trouble right as you’re getting started. I’m hoping to have a fix out in the next couple days or early next week, sorry for the trouble!

-Kyle

No worries at all, Kyle! Thanks for looking into it. I’ll keep an eye out for the update. Happy to test when it’s ready.

I’ll be updating here when the issue is fixed @acolburn

-Kyle

OttoFMS 4.16.2 was just released which fixes this issue. Thanks for the report and your patience! I’ve also added more testing for the OData MCP features so this should not break in future versions. Thank you!

-Kyle

Hi Kyle,

Confirming the fix works — updated to 4.16.2 and the OData 401 error is completely gone. :tada:

Been stuck on this since 2/27. After the update, MCP tool execution (both script calls and execute_sql) works perfectly through Claude Code.

What’s really exciting is that I also have a custom MCP server (fm-dev) for reading DDR/schema info, and Claude Code now autonomously switches between OttoFMS MCP (for live data/script execution) and fm-dev (for schema reference) depending on the task. The two MCPs working together is a game changer for AI-assisted FileMaker development.

One minor note: the update overwrote my NODE_TLS_REJECT_UNAUTHORIZED=0

plist setting (self-signed cert on LAN test server), had to re-add it. Just a heads-up for others.

Thanks for the quick turnaround!
-Bison

1 Like