---
title: "Building Custom Agents"
description: "Morningstar MCP Server building custom agents overview page."
url: "https://developer-beta.morningstar.com/morningstar-mcp-server/building-custom-agents"
image: "https://developer-beta.morningstar.com/_og/d/c_Ocean.takumi,title_~QnVpbGRpbmcgQ3VzdG9tIEFnZW50cyB8IE1vcm5pbmdzdGFyIE1DUCBTZXJ2ZXI,description_Morningstar+MCP+Server+building+custom+agents+overview+page.,props_eyJ0aGVtZSI6eyJtb2RlIjoibGlnaHQiLCJjb2xvcnMiOnsicHJpbWFyeSI6IiMwMDAwMDAifX19,p_Ii9tb3JuaW5nc3Rhci1tY3Atc2VydmVyL2J1aWxkaW5nLWN1c3RvbS1hZ2VudHMi,s_5exAiRfnMacYARGE.png"
---

-   [AI Solutions](https://developer-beta.morningstar.com/ai-solutions)
-   [Morningstar MCP Server](https://developer-beta.morningstar.com/morningstar-mcp-server)
-   [Trial Access](https://developer-beta.morningstar.com/trial-access)

# Morningstar MCP Server

Connect trusted data to your AI workflows with the Morningstar MCP Server.

# Building Custom Agents

[View Markdown](https://developer-beta.morningstar.com/morningstar-mcp-server/building-custom-agents.md)[Download Markdown](https://developer-beta.morningstar.com/morningstar-mcp-server/building-custom-agents.md)

There are several ways to interact with the Morningstar MCP Server, including through Claude, ChatGPT, and Microsoft Copilot.

However, the official integration for building custom agents directly powered by the Morningstar MCP Server currently exists in Microsoft Copilot Studio.

While general-purpose AI assistants can answer investment questions using Morningstar tools, custom agents allow you to design targeted workflows for specific investment tasks. These agents can automatically orchestrate Morningstar tools to retrieve data, research, and insights in a consistent and repeatable way.

In practice, building a Morningstar-powered agent typically involves three steps:

1.  Define the agent’s task and instructions.
2.  Select a model optimized for tool use
3.  Connect the Morningstar MCP Server

## [Define Agent Task and Instructions](#define-agent-task-and-instructions)

The most important step in building a successful agent is **clearly defining its objective and workflow**.

Start by identifying a **single task** the agent should perform. This can be expressed as an **agent story**, describing what the agent is designed to accomplish.

Example:

> _As an agent, I want to gather information about a user's portfolio using Morningstar’s data and research._

Next, outline the **steps a human analyst would follow** to complete the task. These steps become the basis for the instructions you provide to the language model.

Clear instructions are essential because they function as the **system prompt that governs the agent’s behavior**.

When writing instructions:

-   Focus on **what the agent should do**, not what it cannot do
-   Describe the **sequence of tasks the agent should perform**
-   Specify **which tools should be used for each step**
-   Encourage **clear, structured responses grounded in Morningstar research**

### [Example Agent Instructions](#example-agent-instructions)

Below is an example instruction set for a **portfolio analysis agent**:

> Analyze the user's portfolio using Morningstar's data, research, and tools. Begin by retrieving and summarizing the latest Morningstar market outlook to frame the macroeconomic and asset-allocation context. For each holding, pull the most recent Morningstar analyst research (including ratings, fair value estimates, moat or stewardship assessments where available) and key datapoints such as performance, valuation metrics, risk statistics, and expense ratios. If a holding is a mutual fund or ETF, use the holdings tool to evaluate its underlying exposures, sector and geographic allocations, and concentration risks. Assess the overall portfolio's diversification, valuation positioning, style exposure, and risk alignment with the current market outlook. Where appropriate, use the screener tool to identify comparable funds or alternative investments based on relevant criteria. Provide a detailed, clearly structured, summarized, and citeable response grounded in Morningstar research and data.

These instructions guide the model to orchestrate multiple Morningstar tools in a logical workflow.

## [Choose a Model](#choose-a-model)

Selecting the right model is important for reliable **tool calling and orchestration**.

For the best performance with the Morningstar MCP Server:

-   **Claude models** are recommended for strong tool-calling behavior and reliable MCP interactions.
-   **OpenAI models** should use **GPT-5.1 or newer** for optimal results.

Regardless of the model you choose, ensure it supports:

-   Structured tool calling
-   Multi-step reasoning
-   Reliable function invocation

These capabilities allow the model to coordinate Morningstar tools effectively.

## [Set Up the MCP Server](#set-up-the-mcp-server)

Once your agent instructions and model are defined, you can connect the **Morningstar MCP Server** in **Copilot Studio**.

**1.** Go to **\+ Add tool** and select **Model Context Protocol**.

**2.** Scroll down to find the official Morningstar MCP Server connector.

**3.** Enter the MCP server URL and configure authentication using **OAuth 2.0 with dynamic discovery**.

**4.** Follow the prompts to create and save the connection.

When you send your first message, you will be prompted to authenticate.

Select **Open Connection Manager**, complete the authentication flow, and your agent will be connected.

Once configured, the agent can:

-   Retrieve Morningstar data points
-   Access analyst research reports
-   Query editorial market commentary
-   Screen investments
-   Analyze fund holdings

## [Example Use Cases](#example-use-cases)

### [Portfolio Health Check Agent](#portfolio-health-check-agent)

An agent that ingests a client’s portfolio holdings, retrieves the latest Morningstar analyst research and key risk and valuation metrics, and produces a clear **“what changed and why”** summary.

This helps advisors move quickly from raw portfolio data to **client-ready insights**, grounded in Morningstar’s forward-looking research.

### [Product Shelf Optimization Agent](#product-shelf-optimization-agent)

An agent that screens the investable universe using firm-defined criteria such as:

-   Fees
-   Risk characteristics
-   Style exposure
-   Performance metrics
-   Sustainability signals

The agent compares candidates using Morningstar analyst reports and proposes a **shortlist of recommended funds and a watch list**.

This helps investment committees streamline due diligence and improve governance by making selection decisions faster and more transparent.

### [Holdings-Based Risk & Concentration Monitor](#holdings-based-risk-concentration-monitor)

An agent that looks through ETFs and mutual funds to their **underlying holdings** to detect hidden exposures.

The agent can identify:

-   Overlapping holdings across funds
-   Sector or geographic concentration
-   Excess single-name exposure

When risks are detected, the agent can suggest **alternative investments using the screener tool**, helping portfolio managers address concentration risks before they become portfolio problems.