Directories.ai is built to be run from your own AI. We've covered ChatGPT and local models. This one is for people who build their directory's site in a code editor.
If your site is hosted elsewhere and reads its listings from Directories.ai, the agent in Cursor or VS Code is already working on half of the picture: the templates, the pages, the code. Connect it to your directory and it can see the other half too. It can look up real listings while it builds a listing page, check which categories exist before it writes a menu, or fix a thin description it notices along the way.
The one thing you need
The server URL is the same for every client:
https://directories.ai/mcp
Both editors can sign in with OAuth, so in most cases there's no key to copy. The first time the editor connects, it opens a Directories.ai page in your browser. You pick the organization the connection should manage (or tick All my organizations if you have several) and click Allow. Your account needs to belong to an organization, so create a directory first if you haven't.
If you'd rather use a static key, for example on a machine where a browser sign-in is awkward, that works too. It's covered at the end of each section below.
Cursor
Cursor reads MCP servers from a JSON file. Use ~/.cursor/mcp.json in your home folder to make the server available in every project, or .cursor/mcp.json inside one project to keep it there.
{
"mcpServers": {
"directories-ai": {
"url": "https://directories.ai/mcp"
}
}
}
Save the file, and Cursor shows a sign-in prompt the first time it connects. You can check the server is on, and toggle it, from Cursor's MCP settings.
To use an API key instead, add a header and let Cursor read the key from an environment variable, so it never sits in the file:
{
"mcpServers": {
"directories-ai": {
"url": "https://directories.ai/mcp",
"headers": {
"Authorization": "Bearer ${env:DIRECTORIES_AI_API_KEY}"
}
}
}
}
Cursor only reads remote-server variables from your shell profile or system environment, not from an env file, so set DIRECTORIES_AI_API_KEY there.
VS Code
In VS Code, MCP tools are used by Copilot. The simplest route is the guided flow: open the Command Palette, run MCP: Add Server, choose HTTP, paste the URL above and give it an ID such as directories-ai. Sign in when VS Code asks.
If you'd rather write the config yourself, Copilot reads the same mcpServers format as Cursor. Put it in ~/.copilot/mcp-config.json to use your directory in every workspace, or in a .mcp.json file at the root of your project to share it with your team through source control:
{
"mcpServers": {
"directories-ai": {
"type": "http",
"url": "https://directories.ai/mcp"
}
}
}
For an API key instead of OAuth, add a header that reads the key from an environment variable, and set DIRECTORIES_AI_API_KEY in the environment VS Code runs in:
{
"mcpServers": {
"directories-ai": {
"type": "http",
"url": "https://directories.ai/mcp",
"headers": {
"Authorization": "Bearer ${DIRECTORIES_AI_API_KEY}"
}
}
}
}
You may see older guides that use .vscode/mcp.json with a servers key. That format belongs to VS Code's Local harness, which is deprecated and due to be removed in February 2027, so use the locations above for new setups.
Getting an API key
Only needed if you skipped OAuth. In your dashboard, go to Settings → API Keys and create a key. Copy it straight away; you won't see it again. Embed keys (the ones that start with embed_) are for public site scripts and won't work here. You need an organization API key.
First prompts to try
Start with something read-only, so nothing changes while you test:
list_directories. If your directories come back, the connection works.get_directory_health returns a readiness list of what's missing, such as domain, mailing address or tracking, and where you fix each item.Changes go in carefully by default. Imports create drafts, and changes to your live site only ever arrive as a pull request for a person to review.
If something doesn't work
Bearer followed by a space and the key.Disconnecting
Every app you've approved is listed in your dashboard under Settings → API Keys → Connected AI apps. Click Disconnect and it loses access immediately. For a key, revoke it on the same page.
Using another client?
The setup page has current steps, with copy buttons, for Claude, ChatGPT, Gemini, Windsurf and more, and the MCP developer reference covers calling the server from your own code.