---
title: "Creating an MCP Server Service | DreamFactory Docs"
source: "https://docs.dreamfactory.com/AI/mcp-service-creation"
canonical_url: "https://docs.dreamfactory.com/AI/mcp-service-creation"
converted_at: "2026-09-07T16:29:20.341Z"
format: "markdown"
converted_by: "html-to-md-ai"
---
## Quick Reference[​](#quick-reference)

PropertyValue**Service Type**MCP Server**Required Fields**Service Name**Auto-Generated**OAuth Client ID, OAuth Client Secret**Authentication**OAuth 2.0**API Discovery**Automatic — all database and file services are detected at connection time**Supported AI Clients**ChatGPT, Claude, Cursor, any MCP-compatible client

## Overview[​](#overview)

The Model Context Protocol (MCP) is a standardized protocol that enables AI assistants and development tools to interact with your DreamFactory services through a consistent interface. Despite the growing popularity of direct API integrations, MCP-based connections remain an essential part of modern development workflows, allowing AI assistants like ChatGPT, Claude, and Cursor to seamlessly query and manipulate your resources.

But incorporating MCP functionality into your development environment can be challenging. Fortunately, you can use DreamFactory to easily create a full-featured MCP server that exposes your services through the Model Context Protocol. A single MCP server automatically discovers and provides access to **all** database and file storage services configured in your DreamFactory instance. This includes:

- Exploring database schemas, tables, and relationships

- Querying and filtering table data with advanced options

- Creating, updating, and deleting records

- Calling stored procedures and functions

- Managing file storage (listing, reading, creating, and deleting files and folders)

In this tutorial we'll show you how to configure DreamFactory's MCP server service, and then walk through several usage examples.

## Generating the MCP Server and Companion Documentation[​](#generating-the-mcp-server-and-companion-documentation)

To create an MCP Server service, log in to your DreamFactory instance using an administrator account, select the **AI** tab, and then click the purple plus button to create a new connection:

![ai api creation](/assets/images/ai-api-creation-aa5a43a774ae6689012f08368015a3b0.png)

MCP Server Service is currently the only available selection. More AI connectors are on the way, so stay tuned for upcoming additions.

![ai api selection](/assets/images/mcp-service-selection-7432a922610d21b078ce7da3d6b58ed3.png)

You'll be prompted to supply an **API namespace**, **label**, and **description**. Keep in mind the namepace must be lowercase and alphanumeric. The label and description are used for reference purposes within the administration console so you're free to title these as you please:

![mcp service_config](/assets/images/mcp-service-config-d1f2aaa1cb1ad3c8b3afd4be9238e7dc.png)

Next, you'll scroll down to the **Advanced options** section. There you'll find the following fields:

FieldDescription**OAuth Client ID**The OAuth Client ID is generated by DreamFactory for you. This is the field that MCP Server users are going to provide to the MCP client during connection creation.**OAuth Client Secret**The OAuth Client Secret is also generated by DreamFactory for you. This is the field that MCP Server users are going to provide to the MCP client during connection creation.**Custom Login URL**Optional field that you could use in order to have a custom MCP login page. DreamFactory's login page would be used if nothing is provided in this field. [How to configure?](/AI/mcp-custom-login-page)

No API selection neededYou no longer need to select a specific database service. The MCP server **automatically discovers all database and file storage services** available in your DreamFactory instance when an AI client connects. This means a single MCP server gives your AI assistant access to every configured service.

After saving your changes, head over to the **API Docs** tab to review the generated documentation. You'll be presented with information about the MCP endpoint by running the GET request:

![mcp service_docs](/assets/images/mcp-service-docs-021f19bc0b6994917bd03081c51f3904.png)

The **mcp_endpoint** field is what you should use for your AI Agents:
![mcp service_details](/assets/images/mcp-service-details-d0c8f0c4d1fc8810ced95b8620e2e05b.png)

## Example Of Usage[​](#example-of-usage)

First of all you should get your **mcp_endpoint** that we will use in our Agent.

### ChatGPT[​](#chatgpt)

To connect your MCP server with ChatGPT:

1. Make sure Developer Mode is enabled in ChatGPT.

2. Create a new application by navigating to:
Settings -> Apps -> Advanced Settings -> Create app
![mcp-example-creation](/assets/images/mcp-example-creation-fcaf125eaa459556d1f7fdbc544907e3.png)

3. Set authentication to OAuth, use mcp_endpoint, OAuth Client ID, and OAuth Client Secret in your Agent configuration.
![mcp-example-app](/assets/images/mcp-example-app-a63b5e63281835a6e85abd98981dd420.png)

After creating the application, you can attach it to your chat and use its tools. For example, to show the database tables:

1. Attach your newly created application to the chat.
![mcp-example-connect](/assets/images/mcp-example-connect-bcc97a89598f0170ee711cf00d7e1ac7.png)

2. Use the Agent commands to query the MCP server. For example:

```
Show me tables in my database/list tables
```

![mcp-example-list](/assets/images/mcp-example-list-256a76125bfaa0628aed25f7ec349e5e.png)

The Agent will connect to the MCP server using the mcp_endpoint and return the available database tables, allowing you to interact with your data directly from ChatGPT.

### Claude Desktop[​](#claude-desktop)

Claude Desktop connects to a remote DreamFactory MCP server through **Settings → Connectors**. DreamFactory supports Dynamic Client Registration (DCR), so you typically paste the MCP endpoint and let Claude register itself — you do not have to paste the OAuth client id and secret.

**Requirements:**

- Claude Pro, Max, Team, or Enterprise

- Claude Desktop installed

- Your DreamFactory MCP endpoint, which is `https://<host>/mcp/<service-name>` with **no trailing slash**. How to read that URL from API Docs is in the section above; deployment and redirect-URI notes are in [Deploying the MCP Server](/AI/mcp-server-deployment).

1. In Claude Desktop open **Settings** and click **Connectors**.

![Claude Desktop Settings page showing the sidebar with General, Account, Privacy, Billing, Usage, Capabilities, Connectors, and Claude Code options](/assets/images/claude-desktop-settings-68ca3a235856629cdc1806c83590c451.png)

2. Scroll past the built-in connectors and click **Add Connector**.

![Claude Desktop Connectors page showing built-in connectors like Google Drive, Gmail, Google Calendar, and GitHub, along with custom MCP connectors at the bottom](/assets/images/claude-desktop-connectors-ab8c81c5a205484305d0996e73c2015e.png)

3. Give the connector a name and paste the MCP endpoint into **Remote MCP server URL**.

![Add custom connector dialog with Name and Remote MCP server URL fields](/assets/images/claude-desktop-add-connector-2636dcbb205ee9af6130c529f8fa419f.png)

Advanced settings can hold an OAuth client id and secret. Leave them blank unless DCR is disabled on your instance.

![Add custom connector dialog with Advanced settings expanded, showing optional OAuth Client ID and OAuth Client Secret fields](/assets/images/claude-desktop-add-connector-advanced-df570d3c861cbbf59e03fcf46c149888.png)

4. Click **Add**. Claude discovers the OAuth endpoints, registers via DCR, and opens a browser for you to log in to DreamFactory.

5. After login, the connector is active. Ask Claude to list tables or query a service the connecting user's role can reach.

tipIf you see `redirect_uri is not registered for this client`, the usual cause is a busy loopback port, not a missing Claude callback. Native clients (Claude Desktop, Cursor, VS Code) listen on `http://127.0.0.1:<port>/`. See [Deploying the MCP Server](/AI/mcp-server-deployment#connecting-a-client).

### Cursor and VS Code[​](#cursor-and-vs-code)

Point the client at `https://<host>/mcp/<service-name>` over HTTP. A VS Code `mcp.json` looks like this:

```
{  "servers": {    "dreamfactory": { "type": "http", "url": "https://df.example.com/mcp/poc" }  }}
```

Cursor uses the same URL. Do not use `/api/v2/...` — that is the REST API and returns `400 No session token or API Key`. Full proxy, `APP_URL`, and OAuth troubleshooting is in [Deploying the MCP Server](/AI/mcp-server-deployment).