d365-agent-mcpserver-ts

d365-agent-mcpserver-ts

3.1

If you are the rightful owner of d365-agent-mcpserver-ts and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This repository contains the source code for a TypeScript/Node.js implementation of a Model Context Protocol (MCP) Server.

Dynamics 365 AI Agent - MCP Server (TypeScript) (d365-agent-mcpserver-ts)

This repository contains the source code for a TypeScript/Node.js implementation of a Model Context Protocol (MCP) Server. This server can be used to expose various tools and functionalities to MCP-compliant clients.

Overview

The d365-agent-mcpserver-ts is designed to act as a server that AI agents (like those built with LangGraph in d365-agent-orchestrator) can connect to via an MCP client (such as d365-agent-mcpclient-ts). It can expose tools related to Dynamics 365 or other backend systems.

Key Features & Responsibilities

  • MCP Server Implementation: Implements the server-side requirements of the Model Context Protocol using the TypeScript MCP SDK (from submodules/typescript-sdk/packages/mcp-server or a corresponding npm package).
  • Tool Definition & Exposure: Allows developers to define and expose custom tools, specifying their input/output schemas and implementation logic.
  • D365 Integration (Potential/Conditional):
    • If used for Dynamics 365 integration, it would ideally consume a TypeScript D365 OData client generated by d365-agent-odataclient-ts.
    • Current Status Note: The d365-agent-odataclient-ts has known issues for D365 connectivity. Therefore, for D365 specific tools, the d365-agent-mcpserver-dotnet (which uses a working .NET OData client) is the current primary and recommended MCP server in the D365 AI Agent architecture.
  • Alternative Uses: This TypeScript MCP server can be valuable for:
    • Exposing tools that interact with other (non-D365) backend systems, databases, or APIs.
    • Implementing custom logic or computational tools that don't require D365 OData access.
    • Serving as a lightweight MCP tool server if the d365-agent-odataclient-ts issues are resolved in the future.
  • Containerization: Designed to be packaged as a Docker container for deployment.

Technology Stack

  • TypeScript / Node.js
  • Web framework for HTTP transport (e.g., Express, Fastify, or built into the MCP Server SDK).
  • D365 Agent TypeScript MCP SDK (from submodules/typescript-sdk or its npm package).
  • Potentially d365-agent-odataclient-ts if used for D365 and issues are resolved.

Interaction Flow (General MCP Server)

  1. An MCP client (e.g., d365-agent-mcpclient-ts from d365-agent-orchestrator) connects to this server.
  2. The client can use discoverTools to get a list of available tools and their schemas.
  3. The client sends an MCP CallTool request for a specific tool with parameters.
  4. The d365-agent-mcpserver-ts executes the tool's implementation logic.
  5. The result or error is packaged into an McpResponse and sent back to the client.

Getting Started

(Details to be added - typically involves cloning, Node.js/TypeScript setup, installing dependencies, defining tools, and running the server). Refer to the implementation.md in this repository for a detailed development plan.

Contribution

(Details on contribution guidelines if applicable).