Official Directus MCP Server

Hey @bryantgillespie thanks for your reply. I think a big part of my issue was the fact that I was unwittingly trying it out literally hours before Sonnet 4.5 came out, so suspect Claude was just being generally flakey on that day!
I was also doing lots of prompts that involved counting things and adding things up, which exposed me to this bug which I understand has now been fixed, plus I was asking it for things related to Directus users (“How many Projects are assigned to John Smith?” etc), and I think it doesn’t seem to have access to query the directus users so it gets stuck and goes a bit mad trying to answer.

Trying it out again right now, I am still seeing it occasionally getting stuck for like 5-10 minutes on some steps of its answers where it has to query the database for further schema info.

It seems to get very confused with upper / lower case of collection names and fields. We have a convention (don’t ask me why) where Collection names are Capitalised, but field names are lower-case, and it often seems to fetch the schema, but then proceed to make follow-up queries against fields with the wrong capitalisation, which return with permission errors because they don’t exist. It usually gets there in the end, but takes ages.

Big shoutout @bryantgillespie for that new MCP implementation!

Took me just two prompts to get a filter flow with JS operation right.
Another two prompts to create a filter flow with custom Slugify operation from marketplace.

I was wondering tho how you retrieve the operation schemas for available operations, both built-in and custom. I assume this is handled internally. If so, it might make sense to extend the /operations endpoint to list all available (installed) operations along with their schemas, so we can maintain feature parity between REST and MCP.

2 Likes

Is ther any way to run and use mcp sever in a self hosted and air gap environment to use from self hosted n8n or vs code.

My self hosted air gap setup:

Directus in docker

Ollama desktop(woth some llms up to 20b parameters)

n8n and vs code.