PowerPlatform/Dataverse 엔터티 및 레코드에 대한 지능형 액세스를 제공하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 도구는 컨텍스트 인식 지원, 엔터티 탐색 및 메타데이터 액세스를 제공합니다.
주요 특징:
- 서식이 지정되고 상황에 맞는 프롬프트를 통해 풍부한 엔터티 메타데이터 탐색
- 지능형 필터링을 통한 고급 OData 쿼리 지원
- 포괄적인 관계 매핑 및 시각화
- AI 에이전트를 통한 AI 지원 쿼리 구축 및 데이터 모델링
- 엔터티 속성, 관계 및 글로벌 옵션 세트에 대한 전체 액세스
설치
이 도구는 두 가지 방법으로 설치하고 실행할 수 있습니다.
옵션 1: 글로벌 설치
지엑스피1
그런 다음 실행합니다.
옵션 2: npx로 직접 실행
설치하지 않고 실행:
구성
실행하기 전에 다음 환경 변수를 설정하세요.
# PowerPlatform/Dataverse connection details
POWERPLATFORM_URL=https://yourenvironment.crm.dynamics.com
POWERPLATFORM_CLIENT_ID=your-azure-app-client-id
POWERPLATFORM_CLIENT_SECRET=your-azure-app-client-secret
POWERPLATFORM_TENANT_ID=your-azure-tenant-id
용법
이 서버는 Cursor, Claude App, GitHub Copilot과 같은 MCP 호환 클라이언트와 함께 작동하도록 설계되었습니다. 실행되면 PowerPlatform 엔터티 메타데이터 및 레코드를 검색하는 도구가 제공됩니다.
사용 가능한 도구
get-entity-metadata
: PowerPlatform 엔터티에 대한 메타데이터 가져오기get-entity-attributes
: PowerPlatform 엔터티의 속성/필드 가져오기get-entity-attribute
: PowerPlatform 엔터티의 특정 속성/필드 가져오기get-entity-relationships
: PowerPlatform 엔터티에 대한 관계 가져오기get-global-option-set
세트 정의를 가져옵니다.get-record
: 엔티티 이름과 ID로 특정 레코드를 가져옵니다.query-records
: OData 필터 표현식을 사용하여 레코드 쿼리use-powerplatform-prompt
: PowerPlatform 엔터티에 대해 미리 정의된 프롬프트 템플릿을 사용합니다.
MCP 프롬프트
서버에는 PowerPlatform 엔터티에 대한 형식이 지정되고 컨텍스트가 풍부한 정보를 제공하는 프롬프트 기능이 포함되어 있습니다.
사용 가능한 프롬프트 유형
use-powerplatform-prompt
도구는 다음과 같은 프롬프트 유형을 지원합니다.
- ENTITY_OVERVIEW : 엔터티에 대한 포괄적인 개요
- ATTRIBUTE_DETAILS : 특정 엔터티 속성에 대한 자세한 정보
- QUERY_TEMPLATE : 예제 필터가 있는 엔터티에 대한 OData 쿼리 템플릿
- RELATIONSHIP_MAP : 엔터티 관계의 시각적 맵
예시
엔터티 개요 프롬프트
// Example client code
await mcpClient.invoke("use-powerplatform-prompt", {
promptType: "ENTITY_OVERVIEW",
entityName: "account"
});
산출:
## Power Platform Entity: account
This is an overview of the 'account' entity in Microsoft Power Platform/Dataverse:
### Entity Details
- Display Name: Account
- Schema Name: Account
- Description: Business that represents a customer or potential customer
- Primary Key: accountid
- Primary Name: name
### Key Attributes
- name: String (Account Name)
- emailaddress1: String (Email)
- telephone1: String (Main Phone)
- address1_city: String (City)
- statecode: Status (Status)
- accountnumber: String (Account Number)
- industrycode: OptionSetValue (Industry)
- revenue: Money (Annual Revenue)
- ownerid: Owner (Owner)
- createdon: DateTime (Created On)
### Relationships
- One-to-Many Relationships: 42
- Many-to-Many Relationships: 8
You can query this entity using OData filters against the plural name.
속성 세부 정보 프롬프트
await mcpClient.invoke("use-powerplatform-prompt", {
promptType: "ATTRIBUTE_DETAILS",
entityName: "account",
attributeName: "revenue"
});
산출:
## Attribute: revenue
Details for the 'revenue' attribute of the 'account' entity:
- Display Name: Annual Revenue
- Description: Annual revenue for the account
- Type: Money
- Format: Currency
- Is Required: No
- Is Searchable: true
### Usage Notes
- Data Type: Money
- Required: No
- Max Length: N/A
쿼리 템플릿 프롬프트
await mcpClient.invoke("use-powerplatform-prompt", {
promptType: "QUERY_TEMPLATE",
entityName: "account"
});
산출:
## OData Query Template for accounts
Use this template to build queries against the accounts entity:
accounts?$select=name,emailaddress1,telephone1, address1_city,statecode&$filter=name eq 'Example'&$orderby=name asc&$top=50
일반적인 필터 예
- 같음:
name eq 'Contoso'
- 포함:
contains(name, 'Contoso')
createdon gt 2023-01-01T00:00:00Z
- 다중 조건:
name eq 'Contoso' and statecode eq 0
#### Relationship Map Prompt
```javascript
await mcpClient.invoke("use-powerplatform-prompt", {
promptType: "RELATIONSHIP_MAP",
entityName: "contact"
});
산출:
## Relationship Map for contact
This shows all relationships for the 'contact' entity:
### One-to-Many Relationships (contact as Primary)
- contact_activity_parties: contact (1) → activityparty (N)
- contact_connections1: contact (1) → connection (N)
- contact_connections2: contact (1) → connection (N)
- contact_customer_contacts: contact (1) → contact (N)
- contact_master_contact: contact (1) → contact (N)
### One-to-Many Relationships (contact as Related)
- account_primary_contact: account (1) → contact (N)
- customer_contacts: customer (1) → contact (N)
- system_user_contacts: systemuser (1) → contact (N)
### Many-to-Many Relationships
- contactleads_association: contact (N) ↔ lead (N)
- contactopportunities_association: contact (N) ↔ opportunity (N)
- contactquotes_association: contact (N) ↔ quote (N)
프롬프트 예시
다음은 PowerPlatform MCP 프롬프트를 사용하여 도우미와 상호 작용하는 방법에 대한 몇 가지 예입니다.
1. 엔티티 이해
자연어로 엔터티에 대해 도우미에게 질문할 수 있습니다.
User: "Tell me about the Account entity in our PowerPlatform environment"
Response:
[uses ENTITY_OVERVIEW prompt internally]
Here's what I found about the Account entity:
- It's a core business entity representing customers and potential customers
- The primary identifier is 'accountid' and the primary name field is 'name'
- Key fields include:
* name (Account Name)
* emailaddress1 (Email)
* telephone1 (Main Phone)
* revenue (Annual Revenue)
- It has 42 one-to-many relationships and 8 many-to-many relationships
2. 쿼리 작성
쿼리 작성에 도움을 요청할 수 있습니다.
User: "Help me write a query to find active accounts with revenue over $1M in California"
Response:
[uses QUERY_TEMPLATE prompt internally]
Here's the OData query you need:
accounts?$select=name,revenue,statecode,address1_stateorprovince
&$filter=statecode eq 0
and revenue gt 1000000
and address1_stateorprovince eq 'California'
&$orderby=revenue desc
This query:
1. Selects relevant fields
2. Filters for active accounts (statecode eq 0)
3. Checks revenue > $1M
4. Filters for California location
5. Orders by revenue highest to lowest
3. 관계 이해
자연스럽게 엔터티 관계를 탐색할 수 있습니다.
User: "How are Accounts and Contacts related in our system?"
Response:
[uses RELATIONSHIP_MAP prompt for both entities internally]
Here are the key relationships between Accounts and Contacts:
1. Primary Contact (One-to-Many):
- account_primary_contact: Account (1) → Contact (N)
- An account can have many contacts, but one designated as primary
2. Customer Relationship:
- contact_customer_accounts: Contact (N) ← Account (1)
- Contacts can be associated with customer accounts
3. Additional Relationships:
- accountleads_association: For lead tracking
- account_connections: For relationship management
4. 필드/속성 조사
특정 분야에 대해 문의할 수 있습니다.
User: "What kind of field is the revenue field on Account?"
Response:
[uses ATTRIBUTE_DETAILS prompt internally]
The revenue field on Account is:
- Data Type: Money
- Format: Currency
- Not required
- Searchable: Yes
- Used for: Tracking annual revenue for the account
- Can be used in advanced find and filtered views
5. 복잡한 데이터 모델링
데이터 모델링 결정에 대한 도움을 받을 수 있습니다.
User: "I need to design a solution for tracking product reviews. Which entities should I relate to?"
Response:
[uses multiple ENTITY_OVERVIEW and RELATIONSHIP_MAP prompts internally]
Based on the existing data model, here's a suggested approach:
1. Product (existing entity):
- Already has relationships with:
* Price lists
* Product categories
* Inventory units
2. New Review entity should relate to:
- Product (N:1) - Each review is for one product
- Contact (N:1) - Reviews are written by contacts
- Account (N:1) - Optional link to company if B2B review
Here's a sample lookup field structure...
[continues with detailed implementation guidance]
6. 디버깅 지원
문제 해결에 도움을 받을 수 있습니다.
User: "Why am I getting 'invalid property' when querying account.customertypecode?"
Response:
[uses ATTRIBUTE_DETAILS prompt internally]
I see the issue. The field 'customertypecode' is actually named 'customertype' in your environment. Here's the correct field information:
- Logical Name: customertype
- Type: OptionSetValue
- Valid Values:
* 1 = Competitor
* 2 = Consultant
* 3 = Customer
* 4 = Investor
* 5 = Partner
* 6 = Influencer
Try updating your query to use 'customertype' instead of 'customertypecode'.
이러한 예시는 AI 어시스턴트가 MCP 프롬프트를 활용하여 PowerPlatform 개발 작업에 대한 상황 인식적이고 정확한 지원을 제공하는 방법을 보여줍니다. AI는 사용자 환경의 특정 구성을 이해하고 간단한 쿼리부터 복잡한 아키텍처 관련 의사 결정까지 모두 지원할 수 있습니다.
특허
MIT