Enterprise Support MCP Server
Enterprise Support MCP Server
企業の機能をModel Context Protocol (MCP) を通じて大規模言語モデル(LLM)に公開する方法を示す、軽量なエンタープライズAI統合プロトタイプです。
このプロジェクトは、PythonベースのMCPサーバーを介して顧客情報と注文情報を提供します。Mistralを搭載したAIアシスタントが、利用可能なMCPツールを動的に発見し、自然言語のサポートリクエストに基づいてどのツールを呼び出すかを決定します。
より複雑なリクエストの場合、アシスタントは複数のツール呼び出しを反復的に実行し、最終的な応答を生成するのに十分な情報が得られるまで処理を続けます。
このプロジェクトで使用されるすべての顧客および注文レコードは、合成デモデータです。
主な機能
Model Context Protocol (MCP) サーバーとクライアント
動的なMCPツール発見
Mistral AI を使用したLLM主導のツール選択
マルチステップのツール呼び出しワークフロー
エンタープライズデータとの自然言語による対話
顧客および注文の検索
Pydantic データモデル
SQLite 永続化
構造化されたエラーハンドリング
MCP、永続化、AI統合レイヤーの分離
Related MCP server: E-commerce MCP Server
アーキテクチャ
flowchart TD
U[User] --> L[Mistral LLM]
L --> C[MCP Client]
C --> S[Enterprise Support MCP Server]
S --> D[(SQLite Customer / Order Database)]
D --> S
S --> C
C --> L
L --> ULLMはデータベースに直接アクセスしません。
代わりに、エンタープライズ機能は標準化されたMCPツールを通じて公開されます。MCPクライアントはこれらのツールを動的に発見し、そのスキーマをLLMが利用できるようにします。
LLMは、与えられたユーザーリクエストに対してどのツールが必要かを判断します。
サンプルワークフロー
ユーザーが次のように入力します:
Show me customer 1001.アプリケーションは以下のワークフローを実行します:
User request
↓
Mistral LLM
↓
Selects get_customer
↓
MCP Client
↓
Enterprise Support MCP Server
↓
SQLite
↓
Customer data
↓
MCP Client
↓
Mistral LLM
↓
Natural-language response結果の例:
Here is the information for customer 1001:
- Name: Anna Schmidt
- Email: anna@example.com
- Status: ACTIVEアプリケーションコードは、get_customer の選択をハードコードしていません。
LLMがユーザーの自然言語リクエストに基づいて適切なMCPツールを選択します。
利用可能なMCPツール
get_customer
顧客IDで顧客情報を取得します。
入力例:
{
"customer_id": 1001
}get_customer_orders
顧客に属するすべての注文を取得します。
入力例:
{
"customer_id": 1001
}get_order_status
注文の現在のステータスと配送情報を取得します。
入力例:
{
"order_id": 5002
}技術スタック
Python
Model Context Protocol (MCP) Python SDK
Mistral AI
Pydantic
SQLite
asyncio
python-dotenv
uv
はじめに
前提条件
このプロジェクトには以下が必要です:
Python 3.11+
pipuvMistral API キー
Pythonのインストールを確認:
python --versionuv を確認:
uv --version1. リポジトリのクローン
git clone https://github.com/YOUR-USERNAME/enterprise-support-mcp-server.git
cd enterprise-support-mcp-serverYOUR-USERNAME を自分のGitHubユーザー名に置き換えてください。
2. 仮想環境の作成
python -m venv .venvWindows PowerShell
.venv\Scripts\Activate.ps1Linux / macOS
source .venv/bin/activate3. 依存関係のインストール
pip install -r requirements.txt主な依存関係は次のとおりです:
mcp[cli]
mistralai
pydantic
python-dotenv4. Mistral API キーの設定
プロジェクトのルートに .env ファイルを作成します。
テンプレートとして .env.example を使用できます:
MISTRAL_API_KEY=your_mistral_api_key実際の .env ファイルやAPIキーをGitにコミットしないでください。
5. デモデータベースの初期化
次のコマンドを実行します:
python init_db.pyこれにより、MCPツールで使用される合成の顧客および注文レコードを含むローカルのSQLiteデータベースが作成されます。
テスト
このプロジェクトは複数のレベルでテストできます。
テスト1 – データベースアクセス
MCPが関与する前に、データベース関数を独立してテストできます。
デモデータベースが初期化されていることを確認します:
python init_db.pyデータベースレイヤーは以下の操作を提供します:
get_customer
get_customer_orders
get_order_statusこれにより、MCPやLLMとは独立して永続化レイヤーを検証します。
テスト2 – MCPサーバーの起動
次のコマンドを実行します:
python server.pystdioベースのMCPサーバーの場合、HTTPポートやブラウザは開かれません。
プロセスは、標準入出力を通じてMCPクライアントからの通信を待機します。
以下のコマンドでサーバーを停止します:
Ctrl+Cテスト3 – LLMなしのMCPクライアント
次のコマンドを実行します:
python client.pyクライアントはMCPサーバーに接続し、利用可能なツールを発見します。
期待されるツールの発見:
Available tools:
- get_customer
- get_customer_orders
- get_order_statusその後、クライアントはMCPツールを直接呼び出すことができます。
このテストで検証されること:
MCP Client
↓
MCP protocol
↓
MCP Server
↓
SQLite
↓
MCP resultこのテストには大規模言語モデルは必要ありません。
テスト4 – LLM主導のMCPツール選択
次のコマンドを実行します:
python llm_client.pyアプリケーションはまず、サーバーから発見されたMCPツールを表示するはずです:
Available MCP tools:
- get_customer
- get_customer_orders
- get_order_statusその後、自然言語のリクエストを入力できます。
顧客検索
Show me customer 1001.期待される動作:
Mistral
↓
get_customer
↓
customer_id = 1001最終的な応答には、顧客 1001 の情報が含まれている必要があります。
顧客の注文
次のように試してください:
Show me all orders for customer 1001.期待されるツール:
get_customer_orders注文ステータス
次のように試してください:
What is the status of order 5002?期待されるツール:
get_order_statusエンタープライズデータなしのリクエスト
次のように試してください:
What can you help me with?LLMは、顧客や注文データにアクセスせずにこのリクエストに回答できるはずです。
これは、ツールの実行がすべてのリクエストに対してではなく、動的に選択されることを示しています。
テスト5 – マルチステップのツール呼び出し
LLMクライアントは反復的なツール実行をサポートしています。
次のような複雑なリクエストを試してください:
Customer 1001 says that one of her orders has not arrived.
Can you investigate?複雑なリクエストの場合、アシスタントは最終的な応答を生成する前に複数のMCPツールを使用できます。
概念的に:
User
↓
Mistral
↓
MCP Tool
↓
Tool Result
↓
Mistral
↓
Another tool required?
├── Yes → MCP Tool → Result → Mistral
└── No → Final Responseツール呼び出しループには、偶発的な無限実行を防ぐための最大反復回数が設定されています。
エラーハンドリングのテスト
MCPサーバーは、不明なビジネスエンティティも処理します。
例えば:
Show me customer 9999.対応するMCPツールは、顧客情報を捏造する代わりにエラー結果を返します。
これは特にAIベースのエンタープライズ統合において重要です。事実に基づく顧客および注文情報は、LLMではなく、接続されたエンタープライズシステムから取得される必要があります。
プロジェクト構造
enterprise-support-mcp-server/
│
├── server.py
│ └── MCP server and tool definitions
│
├── client.py
│ └── MCP client for direct tool testing
│
├── llm_client.py
│ └── Mistral integration and agentic tool-calling workflow
│
├── database.py
│ └── Database access layer
│
├── models.py
│ └── Pydantic domain models
│
├── init_db.py
│ └── Creates synthetic demo data
│
├── requirements.txt
├── .env.example
├── .gitignore
└── README.mdなぜMCPなのか?
LLMはアプリケーション固有の関数を直接呼び出すこともできます。
MCPは、AIアプリケーションと外部機能の間に標準化されたインターフェースを導入します。
このプロジェクトでは:
Mistral
↓
Tool Calling
↓
MCP Client
↓
Standardized MCP interface
↓
Enterprise Support MCP Server
↓
Enterprise capabilitiesLLMはどの機能が必要かを判断する責任があります。
MCPは、それらの機能を標準化されたプロトコルを通じて公開する責任があります。
この分離により、エンタープライズバックエンドを特定のLLMプロバイダー向けに設計する必要がなくなります。
プロジェクトの目的
このプロジェクトは意図的に小さく、1つのアーキテクチャ上の問いに焦点を当てています:
既存のエンタープライズ機能を、標準化された統合レイヤーを通じてAIアシスタントが利用できるようにするにはどうすればよいか?
以下の組み合わせを示しています:
エンタープライズシステム統合
Model Context Protocol
LLMツール呼び出し
エージェント的ワークフロー
構造化されたビジネスデータ
関心事の分離
このプロジェクトは、AIアシスタントを既存のエンタープライズアプリケーションと統合するための実用的なプロトタイプとして機能します。
セキュリティに関する注意
このリポジトリには合成デモデータのみが含まれています。
APIキー、認証情報、顧客データ、その他の機密情報をソースコードやコミットされた .env ファイルを通じて公開しないでください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceA Model Context Protocol server that enables large language models to access database metadata and perform cross-engine data querying across diverse database ecosystems.1652Apache 2.0
- Flicense-qualityDmaintenanceProvides tools to query e-commerce data including customer information, order details, and product inventory through a Model Context Protocol interface with test data.
- FlicenseAqualityCmaintenanceA Model Context Protocol server that lets LLM clients answer business questions in natural language over a Databricks dataset without writing SQL by hand.1
- Flicense-qualityBmaintenanceEnables natural-language querying of structured data via Model Context Protocol, allowing AI agents to answer questions without SQL or API knowledge.
Related MCP Connectors
The grounded data layer for any LLM: governed SQL, metrics, lineage and catalog over your data.
A Model Context Protocol server for Wix AI tools
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pbpeter/enterprise-support-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server