I connect my Notion MCP, the AI model says it has no access to anything, and the error has no name…
I have the OpenAI Chat Model configured with a Token from LM Studio, when I go to configure the model, it simply tells me: Could not Verify Models. Check Credentials even though everything is correct. If I try to save, it technically saves because supposedly a model from an old credential that no longer exists already existed.
And another time when I tried to save, something appeared like: sqlite constraint, foreign key constraint failed
Hi @x0tiago Welcome!
These three are all the local setup, not three separate n8n bugs.
“Could not verify models” means n8n never reached LM Studio’s /v1/models to build that list. Turn on “Serve on Local Network” in LM Studio so it stops binding only to 127.0.0.1, and if n8n runs in Docker, point the credential Base URL at the host and include /v1:
http://host.docker.internal:1234/v1
On Linux also add --add-host=host.docker.internal:host-gateway to the n8n container. Then set Model to By ID and type the exact model id LM Studio shows, instead of relying on the dropdown.
The Notion MCP tools are attached, the model just never sees them. LM Studio loads a model with a 4096 token context by default and the MCP tool schemas don’t fit in that, so the agent replies as if it has access to nothing. Raise Context Length in the model’s load settings to 16384 or higher and reload the model.
See this:
The foreign key error is n8n writing a row that points at the credential you already deleted. Delete that OpenAI Chat Model node, save, then add a fresh node with the new credential so nothing references the old one. If it still fires on a clean node, post your exact n8n version and the container log line from that save.
If you’d rather put a hosted model behind the MCP agent than fight the local one, this covers the providers and which have native credential types:
First: I configured a model and now its right configured thanks.
Second, now im gonna try to test the model this error happens. Like what this even mean?
Im sorry, but i dont get the part where i said i was using a n8n node.
Im using a configuration of an Agent. And there is no such options as some of that.
The Agent’s own settings aren’t what decides this. The Agent hands the MCP tool schemas to whatever chat model is attached underneath it, and a local model that wasn’t trained for tool calling ignores them and answers as if nothing is connected. That is also why raising context changed nothing when you were already at 20k.
In LM Studio, check the model you have loaded for the tool use capability badge. If it isn’t there, load one that has it, Qwen3 instruct builds do, and run the Agent again with nothing else changed.
See this:
That sounds like a few different issues happening at the same time, so I’d troubleshoot them one by one instead of trying to fix everything at once.
For the Notion MCP issue, double-check that the integration has access to the correct pages or databases. Even if it’s connected successfully, missing permissions can make the AI act like it has no access.
For LM Studio, verify that the base URL and API key are correct and make sure the model is actually loaded in LM Studio before n8n tries to connect. The “Could not Verify Models” message often shows up when n8n can’t reach the API or doesn’t get a valid response.
The SQLite foreign key constraint error sounds more like a database issue. If it started after editing or deleting credentials, there could be stale references in the database.
Well i already checked the Notion MCP, is has the connection done right with all the pages.
LM Studio its not the right URL obvioulsy, because my n8n is running in a docker container and the LLM is on my PC but everything is connected because in the past worked and i didnt change anything.
Maybe yeah its a error of the database, will check it out if already do not give me that error.