Skip to content

[Feature] support Model Context Protocol (MCP) in v1.4 release #1832

Open
1 of 2 issues completed
Open

Description

@zhiweizhangintc

Priority

P1

OS type

Ubuntu

Hardware type

Gaudi2

Running nodes

Multiple Nodes

Description

Requirement: GenAI Example Use case (AgentQnA or Finance QnA):

Corporate Earnings & Corporate Filings Summaries

────────────────────────────────────────────────────────────

• Overview:

– The AI agent monitors earnings announcements, SEC filings (e.g., 10-K, 10-Q), and news articles via web search throughout the quarter.

– From the RAG repository, it retrieves internal research notes, prior quarterly analyses, and watchlist priorities.

– When prompted, the agent synthesizes both external filings and internal data to provide concise, insightful summaries of a company’s financial health, risks, and potential impact on the user’s portfolio.
 

• Potential Features/Flows:

– Automated Filings Lookup: Agent uses the web search to locate and parse 10-K/10-Q financial documents, press releases, or analyst calls.

– Internal Analysis Context: Through the RAG knowledge base, the AI references the user’s own archived commentary or historical data for that stock/sector.

– Custom Alerts & Summaries: After each earnings release, the AI agent can provide an at-a-glance report, highlighting core metrics (e.g., revenue growth, margin changes, management guidance, financial insights and rating).
 

• Example customer query:

– “AI, summarize Apple Corporation’s latest 10-K filing and tell me how it differs from last year’s guidance. Also, check my previous notes on my PC investment folder and let me know if anything contradicts the new data.”

Reference Information for consideration:

please access if we can integrate existing open source solution MCP Bridge as a wrapper (beyond openAI compliant API format) at GenAI Component level

integrate MCP Bridge with vLLM backend on both XEON and Gaudi cases

Please add MCP servers into the AgentQnA/Finance Agent to demo an E2E use case at GenAI Example level

Accessing external tools:

through MCP servers for Yahoo Finance, Bloomberg

Details of MCP server addresss can be found at mcp.so

Accessing local data knowledge base: through MCP servers for Redis VDB, locally stored 10K report (PDF, Word, XLS, CSV) from company A (e.g. Apple) for previous years (e.g. 2023 & 2024).

Activity

  1. added this to the v1.4 milestone on Apr 22, 2025
  2. joshuayao commented on Jun 3, 2025

    @joshuayao
    Collaborator

    Hi @mkbhanda below is the detailed definition of the feature based on Zhiwei's MCP requirements.

    Goal

    1. OPEA Microservices as MCP Servers: allow individual OPEA microservice instance to optionally act as MCP server.
    2. OPEA MCP Tool: facilitate seamless integration between agents and MCP servers.

    The design is from @lvliang-intel and @Spycsh .

    OPEA Microservice as MCP Servers

    Configurations

    A new environment variable, ENABLE_MCP (bool), will be introduced to decide whether the OPEA microservice to act as a MCP server or not:

    • ENABLE_MCP=True: The microservice will initialize and run as an MCP server using FastMCP.
    • ENABLE_MCP=False: The microservice will start as it currently does, running its standard asyncio event loop for FastAPI request handling, without initializing the FastMCP server.

    Microservice Abstraction Layer Changes

    Registration

    @register_microservice(
        ...
        enable_mcp=enable_mcp,
        mcp_func_type=MCPFuncType.TOOL,
        ...
    )

    Behind the decorator, OPEA will register the portal function of each microservice to MCP according to mcp_func_type (tool, prompt, resource).

    Microservice Startup

    If ENABLE_MCP is True, a MCP server will be started with SSE transport.

    Microservice Changes

    1. For the Python bootstrap of each microservice, do the following changes:
    ...
    enable_mcp = os.getenv("ENABLE_MCP", "").strip().lower() in {"true", "1", "yes"}
    ...
    @register_microservice(
         ...
        enable_mcp=enable_mcp,
        mcp_func_type=MCPFuncType.TOOL,
        ...
    )
    ...
    1. Update docker compose files and helm chats to detect the environment variable ENABLE_MCP.
    2. Add unit test cases.

    Status Tracker

    OPEA MCP Tool

    The OPEA MCP Tool provides a unified interface for managing MCP clients and interacting with tools exposed by MCP servers. It supports both SSE (Server-Sent Events) and Stdio server configurations, making it flexible for various use cases.

    Features

    • Dynamic Tool Registration: Automatically registers tools exposed by MCP servers for natural invocation.
    • Asynchronous Operations: Fully asynchronous API for efficient integration with modern Python applications.
    • Context Management: Supports Python's async with syntax for automatic resource management.
    • Error Handling: Robust error handling for client initialization, tool execution, and disconnection.

    Status Tracker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions