---
title: "Mcp Service Creation - DreamFactory Documentation"
source: "https://wiki.dreamfactory.com/AI_Services/Mcp_Service_Creation"
canonical_url: "https://wiki.dreamfactory.com/AI_Services/Mcp_Service_Creation"
converted_at: "2026-04-05T06:17:43.353Z"
format: "markdown"
converted_by: "html-to-md-ai"
---
[]()
	
	
	
	# AI Services/Mcp Service Creation

	
		From DreamFactory Wiki
		
		
		
		
		[Jump to navigation](#mw-head)
		[Jump to search](#searchInput)
		**Step-by-step guide to creating an MCP (Model Context Protocol) server service in DreamFactory for AI assistant integration**

## Contents

- [1 Creating an MCP Server Service](#Creating_an_MCP_Server_Service)

- [1.1 Quick Reference](#Quick_Reference)

- [1.2 Overview](#Overview)

- [1.3 Generating the MCP Server and Companion Documentation](#Generating_the_MCP_Server_and_Companion_Documentation)

- [1.4 Example Of Usage](#Example_Of_Usage)

- [1.4.1 ChatGPT](#ChatGPT)

- [1.5 See also](#See_also)

# Creating an MCP Server Service

## Quick Reference

Property

Value

**Service Type**

MCP Server

**Required Fields**

API Name, Database Service

**Auto-Generated**

OAuth Client ID, OAuth Client Secret

**Authentication**

OAuth 2.0

**Supported AI Clients**

ChatGPT, Claude, Cursor, any MCP-compatible client

## Overview

The Model Context Protocol (MCP) is a standardized protocol that enables AI assistants and development tools to interact with your DreamFactory database 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 database 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 database services through the Model Context Protocol. This server can perform all of the standard database operations, including:

- 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 database resources

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

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:

[![](/images/2/2d/Ai-api-creation.png)](/File:Ai-api-creation.png)  [](/File:Ai-api-creation.png)ai api creation
MCP Server Service is currently the only available selection. More AI connectors are on the way, so stay tuned for upcoming additions.

[![](/images/1/1a/Mcp-service-selection.png)](/File:Mcp-service-selection.png)  [](/File:Mcp-service-selection.png)ai api selection
You'll be prompted to supply an **API name**, **label**, and **description**. Keep in mind the name must be lowercase and alphanumeric, as it will be used as the namespace within your generated API URI structure. The label and description are used for reference purposes within the administration console so you're free to title these as you please:

[![](/images/c/cb/Mcp-service-config.png)](/File:Mcp-service-config.png)  [](/File:Mcp-service-config.png)mcp service_config
Next, you'll scroll down to the **Advanced options** section. There you'll need to supply the following details. There are only 2 required fields:

Field

Description

**API Name**

Select the DreamFactory database service that you want to expose through MCP. This must be an existing database service configured in your DreamFactory instance. The dropdown will show all available database services.

**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 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 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_Services/Mcp_Custom_Login_Page)

The **API Name** field is a dropdown that lists all available database services in your DreamFactory instance. Simply select the database service you want to expose through MCP. This service must already be configured in DreamFactory before you can select it.

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:

[![](/images/6/66/Mcp-service-docs.png)](/File:Mcp-service-docs.png)  [](/File:Mcp-service-docs.png)mcp service_docs
The **mcp_endpoint** field is what you should use for your AI Agents:

[![](/images/d/dc/Mcp-service-details.png)](/File:Mcp-service-details.png)  [](/File:Mcp-service-details.png)mcp service_details

## Example Of Usage

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

### 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 [![](/images/2/26/Mcp-example-creation.png)](/File:Mcp-example-creation.png)  [](/File:Mcp-example-creation.png)mcp-example-creation

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

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.

[![](/images/5/57/Mcp-example-connect.png)](/File:Mcp-example-connect.png)  [](/File:Mcp-example-connect.png)mcp-example-connect 2. Use the Agent commands to query the MCP server. For example:

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

[![](/images/b/bf/Mcp-example-list.png)](/File:Mcp-example-list.png)  [](/File:Mcp-example-list.png)mcp-example-list
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.

## See also

- [MCP Server](/AI_Services/Mcp_Service)

Retrieved from "[https://wiki.dreamfactory.com/index.php?title=AI_Services/Mcp_Service_Creation&oldid=806](https://wiki.dreamfactory.com/index.php?title=AI_Services/Mcp_Service_Creation&oldid=806)"
		[Categories](/Special:Categories): - [Mcp](/Category:Mcp)
- [Model Context Protocol](/Category:Model_Context_Protocol)
- [Ai Integration](/Category:Ai_Integration)