Skip to content

Commit bd4b47c

Browse files
author
Dev Agent Amelia
committed
v0.3.7: docs site, 23 bug fixes, schema roadmap
Documentation: - GitHub Pages site (Jekyll + Just the Docs dark theme) - New pages: Getting Started, Roadmap, Community, Capabilities, 5 Use-Case guides - Roadmap v0.4 expanded: HTTP transport + schema consistency reinforcement - Upcoming auth methods documented (Azure AD, Managed Identity) - CHANGELOG backfilled v0.2.0 through v0.3.7 Bug fixes (sessions 1-8, 23 fixes): - BUG-021: HasNotes as plain boolean, BooleanManagedProperty handling - BUG-022/023: Idempotent RBAC (role assign/remove with pre-check) - BUG-024: FetchXML entity set resolution - ETag-based optimistic concurrency for updates - Guardrails: confirm param on all destructive operations - Structured JSON errors with actionable suggestions - 482/482 tests passing
1 parent ede9022 commit bd4b47c

96 files changed

Lines changed: 2313 additions & 245 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
# MCP Dataverse Configuration
22
# Set these environment variables (or use config.json for local dev)
33

4+
# Required: your Dataverse / Power Platform environment URL
45
DATAVERSE_ENV_URL=https://yourorg.crm.dynamics.com
5-
AUTH_MODE=pac
6-
PAC_PROFILE_NAME=default
76

8-
# MSAL client credentials (required if AUTH_MODE=msal)
9-
TENANT_ID=
10-
CLIENT_ID=
11-
CLIENT_SECRET=
7+
# Optional: path to a config.json file (overrides DATAVERSE_ENV_URL)
8+
# MCP_CONFIG_PATH=/home/you/.mcp-dataverse/config.json
129

1310
# Tuning (optional)
1411
# REQUEST_TIMEOUT_MS=30000
1512
# MAX_RETRIES=3
13+
14+
# ── Authentication ────────────────────────────────────────────────────────────
15+
# No credentials are required here.
16+
# Authentication uses the Microsoft Device Code Flow (MSAL):
17+
# 1. Run: npx mcp-dataverse install (or npx mcp-dataverse-auth)
18+
# 2. Open the URL shown in the terminal and enter the displayed code
19+
# 3. Sign in with your Microsoft / Power Platform account
20+
# The token is cached in ~/.mcp-dataverse/msal-cache.json and reused silently.

.github/workflows/pages.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [master]
6+
paths:
7+
- 'docs/**'
8+
- 'CAPABILITIES.md'
9+
- 'CHANGELOG.md'
10+
- 'assets/**'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
concurrency:
19+
group: pages
20+
cancel-in-progress: false
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v5
31+
32+
- name: Build with Jekyll
33+
uses: actions/jekyll-build-pages@v1
34+
with:
35+
source: ./docs
36+
destination: ./_site
37+
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
41+
deploy:
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
needs: build
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ config.json
99
.DS_Store
1010
coverage/
1111

12+
1213
# Test artifacts
1314
test-output.txt
1415
*.local
@@ -24,6 +25,7 @@ scripts/
2425
mcp-template/
2526
autoparc/
2627
assets/
28+
debug/
2729
!assets/logo.webp
2830

2931
# Private planning & internal artifacts (security/privacy)
@@ -35,6 +37,7 @@ refine.md
3537
refinev2.md
3638
refinev3.md
3739
PUBLISHING.md
40+
ROADMAP-PERSONAL.md
3841

3942
# Internal IDE/workflow configs
4043
.vscode/mcp.json

CAPABILITIES.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# MCP Dataverse Server — Complete Capabilities Reference
22

3-
> **Version**: 0.3.2 | **API Version**: Dataverse Web API v9.2 | **Transport**: stdio · HTTP/SSE
3+
> **Version**: 0.3.6 | **API Version**: Dataverse Web API v9.2 | **Transport**: stdio · HTTP/SSE
44
5-
54 tools across 23 categories for full Dataverse lifecycle: schema, CRUD, FetchXML, solutions, plugins, audit, files, users, teams, environment variables, and more.
5+
63 tools across 24 categories for full Dataverse lifecycle: schema, CRUD, FetchXML, solutions, plugins, audit, files, users, teams, RBAC, environment variables, workflows, and more.
66

77
---
88

99
## Table of Contents
1010

1111
- [Quick Start](#quick-start)
1212
- [Architecture Overview](#architecture-overview)
13-
- [Tool Reference (54 tools)](#tool-reference-54-tools)
13+
- [Tool Reference (63 tools)](#tool-reference-63-tools)
1414
- [1. Auth (1)](#1-auth-1-tool)
1515
- [2. Metadata (8)](#2-metadata-8-tools)
1616
- [3. Query (3)](#3-query-3-tools)
@@ -91,7 +91,7 @@ Server communicates over **stdio** (MCP SDK `StdioServerTransport`). Connect fro
9191

9292
```mermaid
9393
graph LR
94-
MCP["MCP Dataverse Server<br/><i>54 tools · 23 categories</i>"]
94+
MCP["MCP Dataverse Server<br/><i>63 tools · 24 categories</i>"]
9595
9696
MCP --> AUTH["🔑 Auth (1)"]
9797
MCP --> META["📋 Metadata (8)"]
@@ -122,7 +122,7 @@ All tool handlers validate inputs with **Zod** before calling the `DataverseAdva
122122

123123
---
124124

125-
## Tool Reference (50 tools)
125+
## Tool Reference (63 tools)
126126

127127
### 1. Auth (1 tool)
128128

@@ -1012,7 +1012,7 @@ Dataverse error bodies are formatted as `Dataverse error <code>: <message>`. Tim
10121012
| Limitation | Details |
10131013
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
10141014
| **UUID required for get/update/delete** | Alternate-key retrieval via `dataverse_get` is not supported; use `dataverse_upsert` or `dataverse_query` instead. |
1015-
| **No ETag conditional update** | `dataverse_update` sends `If-Match: *`. ETag-based optimistic concurrency is not exposed. |
1015+
| **ETag conditional update** | `dataverse_update` supports optional `etag` parameter for optimistic concurrency (`If-Match: <etag>`). When omitted, sends `If-Match: *`. |
10161016

10171017
### Authentication
10181018

@@ -1036,4 +1036,4 @@ Dataverse error bodies are formatted as `Dataverse error <code>: <message>`. Tim
10361036

10371037
---
10381038

1039-
_This document reflects the MCP Dataverse server codebase as of v0.2.050 tools across 22 categories._
1039+
_This document reflects the MCP Dataverse server codebase as of v0.3.663 tools across 24 categories._

CHANGELOG.md

Lines changed: 106 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,112 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) — [Semantic V
55

66
---
77

8-
## [0.2.0] — Unreleased
8+
## [0.3.7] — 2026-03-02
9+
10+
### Added
11+
12+
- **GitHub Pages documentation site** — full Jekyll + Just the Docs theme at `codeurali.github.io/mcp-dataverse`
13+
- New doc pages: Getting Started, Roadmap, Community, Capabilities, 5 Use-Case guides
14+
- **Roadmap v0.4** expanded with schema consistency reinforcement (parameter naming, `errorCategory`, preflight checks)
15+
- **Upcoming auth methods** documented — Azure AD (Client Credentials) and Managed Identity planned, architecture confirmed ready
16+
17+
### Changed
18+
19+
- CAPABILITIES.md updated to 63 tools, version alignment, ETag fix documented
20+
- README.md refreshed with new docs site URLs and community links
21+
- CHANGELOG backfilled with all versions from v0.2.0 through v0.3.6
22+
23+
---
24+
25+
## [0.3.6] — 2026-03-02
26+
27+
### Fixed
28+
29+
- **BUG-021 final fix**`dataverse_update_entity`: `HasNotes` now sent as plain `boolean` (was incorrectly wrapped in `{ Value: bool }` — Dataverse expects `Edm.Boolean`, not `BooleanManagedProperty`)
30+
- `dataverse_update_entity`: graceful error handling for `0x80060888` — returns structured JSON with actionable suggestions (e.g. enable org-level audit) instead of raw exception
31+
- `IsAuditEnabled` / `ChangeTrackingEnabled` both return clear guidance when the operation is blocked at org level
32+
33+
---
34+
35+
## [0.3.5] — 2026-03-01
36+
37+
### Fixed
38+
39+
- **BUG-021**`dataverse_update_entity`: `IsAuditEnabled` wrapped as `BooleanManagedProperty` (`{ Value: bool }`); `@odata.type: "#Microsoft.Dynamics.CRM.EntityMetadata"` added to PATCH body
40+
- **BUG-022**`dataverse_assign_role_to_user`: idempotence now functional — pre-check via `$expand=systemuserroles_association` before `associate`; returns `"already_assigned"` if role already present
41+
- **BUG-023**`dataverse_remove_role_from_user`: idempotence now functional — pre-check before `disassociate`; returns `"not_assigned"` if role absent
42+
43+
---
44+
45+
## [0.3.4] — 2026-03-01
46+
47+
### Added
48+
49+
- `dataverse_list_connection_references` — list Connection References in the environment (active/inactive count, connector details)
50+
51+
---
52+
53+
## [0.3.3] — 2026-03-01
54+
55+
### Added
56+
57+
- `dataverse_list_roles` — list Dataverse security roles with optional `nameContains` filter
58+
- `dataverse_assign_role_to_user` — assign a security role to a user (`confirm: true` required)
59+
- `dataverse_remove_role_from_user` — remove a security role from a user (`confirm: true` required)
60+
61+
---
62+
63+
## [0.3.2] — 2026-03-01
64+
65+
### Added
66+
67+
- `dataverse_update_entity` — modify entity metadata flags (HasNotes, ChangeTracking, Audit) with `confirm: true` required; auto-publishes by default
68+
- `dataverse_create_environment_variable` — create an environment variable definition + value in Dataverse (`confirm: true` required)
69+
- **Write guardrails**`checkWriteGuardrails` on destructive tools surfaces `[WARN] DESTRUCTIVE_OP` in `data.warnings[]`
70+
71+
---
72+
73+
## [0.3.1] — 2026-03-01
74+
75+
### Fixed
76+
77+
- **BUG-018**`dataverse_query`: `count=true` now shows total in summary (`"N records returned from X (total in dataset: Y)"`)
78+
- **BUG-019**`dataverse_get`: `expand` parameter now properly forwarded to `getRecord` (was silently ignored)
79+
- **BUG-020**`formattedValues: true` parameter added to `dataverse_query`, `dataverse_get`, `dataverse_execute_fetchxml`, `dataverse_retrieve_multiple_with_paging` — transmits `Prefer: odata.include-annotations` header; picklist fields return `{ value, label }` objects
80+
81+
### Added
82+
83+
- **Query guardrails**`checkQueryGuardrails` surfaces warnings in response: `[WARN] NO_SELECT`, `[INFO] NO_FILTER`, `[WARN] LARGE_RESULT_SET`
84+
85+
---
86+
87+
## [0.3.0] — 2026-03-01
88+
89+
### Added
90+
91+
- `dataverse_list_workflows`**reimplemented**: queries the real Dataverse `workflows` entity (Cloud Flows, Business Rules, Classic Workflows); supports `category`, `nameContains`, `top` parameters
92+
- `dataverse_get_workflow`**reimplemented**: retrieves a Dataverse Process by GUID with enriched `categoryLabel` / `stateLabel`
93+
- `dataverse_list_guides` — new tool replacing old `list_workflows` behavior (lists 10 built-in MCP operational guides)
94+
- `dataverse_get_guide` — new tool replacing old `get_workflow` behavior (returns step-by-step MCP guide by name)
95+
96+
### Fixed
97+
98+
- **BUG-013**`dataverse_get_attribute_option_set`: summary showed "0 options" — handler used `Options` (PascalCase) but client returns `options` (camelCase)
99+
- **BUG-014**`dataverse_list_dependencies`: summary showed "1 dependencies" — fallback wrapped entire result object; now reads `count` directly
100+
- **BUG-015**`dataverse_retrieve_multiple_with_paging`: summary showed "X records across 1 pages" — used `result.pages` instead of `result.pageCount`
101+
- `dataverse_publish_customizations`: added 120 s timeout for `PublishAllXml` / `PublishXml` (previously timed out on large solutions)
102+
- `dataverse_list_users`: removed `.refine()` — all parameters now truly optional
103+
- `dataverse_batch_execute`: summary now correctly shows `"2/2 operations succeeded"` instead of `"0/N"`
104+
- `dataverse_solution_components`: summary count now accurate
105+
- `dataverse_create_annotation`: actionable error message when `HasNotes=false` (instructions to enable Notes in Power Apps maker portal)
106+
107+
### Improved
108+
109+
- Enriched error messages across 6 tools: `get_environment_variable`, `set_workflow_state`, `execute_action`, `execute_bound_action`, `execute_bound_function`, `change_detection`
110+
111+
---
112+
113+
## [0.2.0] — 2026-02-28
9114

10115
### Added
11116

README.md

Lines changed: 44 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
**The most complete MCP server for Microsoft Dataverse.**
88

9-
54 tools · 4 resources · 10 guided workflows · Zero config auth
9+
63 tools · 4 resources · 10 guided workflows · Zero config auth
1010

1111
[![npm](https://img.shields.io/npm/v/mcp-dataverse)](https://www.npmjs.com/package/mcp-dataverse)
1212
[![npm downloads](https://img.shields.io/npm/dm/mcp-dataverse)](https://www.npmjs.com/package/mcp-dataverse)
1313
[![Node 20+](https://img.shields.io/badge/Node.js-20%2B-green)](https://nodejs.org)
1414
[![TypeScript](https://img.shields.io/badge/TypeScript-5.4-blue)](https://www.typescriptlang.org)
1515
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow)](LICENSE)
1616

17-
**[→ Full Documentation](https://codeurali.github.io/mcp-dataverse-docs)**
17+
**[→ Full Documentation](https://codeurali.github.io/mcp-dataverse)**
1818

1919
</div>
2020

@@ -41,7 +41,7 @@ npx mcp-dataverse install
4141

4242
The interactive wizard configures your environment, registers the server in VS Code, and authenticates your Microsoft account in under 2 minutes.
4343

44-
> Requires Node.js 20+. For other clients (Claude, Cursor, Windsurf…) see [Multi-Client Setup](https://codeurali.github.io/mcp-dataverse-docs/multi-client-setup).
44+
> Requires Node.js 20+. For other clients (Claude, Cursor, Windsurf…) see [Multi-Client Setup](https://codeurali.github.io/mcp-dataverse/multi-client-setup).
4545
4646
---
4747

@@ -59,33 +59,52 @@ Re-authenticate after ~90 days of inactivity: `npx mcp-dataverse-auth`
5959

6060
## Capabilities
6161

62-
| Category | Count | Description |
63-
|----------|-------|-------------|
64-
| **Metadata** | 8 | Tables, schema, relationships, option sets, entity keys |
65-
| **Query** | 3 | OData, FetchXML, paginated retrieval |
66-
| **CRUD** | 6 | Get, create, update, delete, upsert, assign |
67-
| **Actions & Functions** | 6 | Bound/unbound Dataverse actions and functions |
68-
| **Batch** | 1 | Up to 1000 operations atomically |
69-
| **Solutions** | 3 | List solutions, components, publish customizations |
70-
| **Search** | 1 | Full-text Relevance Search |
71-
| **Users & Teams** | 3 | Users, roles, teams |
72-
| **Files** | 2 | Upload/download file and image columns |
73-
| **+ more** || Audit, trace logs, delta tracking, impersonation, annotations… |
74-
| **Assistance** | 4 | Tool router, workflow guide |
75-
76-
[→ Full Capabilities Reference](https://codeurali.github.io/mcp-dataverse-docs/capabilities)
62+
| Category | Count | Description |
63+
| ----------------------- | ----- | -------------------------------------------------------------- |
64+
| **Metadata** | 8 | Tables, schema, relationships, option sets, entity keys |
65+
| **Query** | 3 | OData, FetchXML, paginated retrieval |
66+
| **CRUD** | 6 | Get, create, update, delete, upsert, assign |
67+
| **Actions & Functions** | 6 | Bound/unbound Dataverse actions and functions |
68+
| **Batch** | 1 | Up to 1000 operations atomically |
69+
| **Solutions** | 3 | List solutions, components, publish customizations |
70+
| **Search** | 1 | Full-text Relevance Search |
71+
| **Users & Teams** | 3 | Users, roles, teams |
72+
| **Files** | 2 | Upload/download file and image columns |
73+
| **+ more** | | Audit, trace logs, delta tracking, impersonation, annotations… |
74+
| **Assistance** | 4 | Tool router, workflow guide |
75+
76+
[→ Full Capabilities Reference](https://codeurali.github.io/mcp-dataverse/capabilities)
7777

7878
---
7979

8080
## Troubleshooting
8181

82-
| Symptom | Fix |
83-
|---------|-----|
84-
| No sign-in prompt | Open **View → Output → MCP** — the device code is displayed there |
85-
| `No MSAL accounts found` | Run `npx mcp-dataverse-auth` then restart the server |
86-
| `Authentication timed out` | 5-minute window expired — restart MCP for a new code |
87-
| Server not appearing in Agent mode | Run `npx mcp-dataverse install` or `npx mcp-dataverse doctor` |
88-
| HTTP errors | Run `npx mcp-dataverse doctor` to diagnose config and connectivity |
82+
| Symptom | Fix |
83+
| ---------------------------------- | ------------------------------------------------------------------ |
84+
| No sign-in prompt | Open **View → Output → MCP** — the device code is displayed there |
85+
| `No MSAL accounts found` | Run `npx mcp-dataverse-auth` then restart the server |
86+
| `Authentication timed out` | 5-minute window expired — restart MCP for a new code |
87+
| Server not appearing in Agent mode | Run `npx mcp-dataverse install` or `npx mcp-dataverse doctor` |
88+
| HTTP errors | Run `npx mcp-dataverse doctor` to diagnose config and connectivity |
89+
90+
---
91+
92+
## Battle-Tested
93+
94+
All 63 tools tested on a real Dataverse production environment across 8 live sessions — **55 ✅ · 9 ⚠️ · 1 ❌ (env-specific)**. [Details & test results →](https://codeurali.github.io/mcp-dataverse/community)
95+
96+
---
97+
98+
## Roadmap
99+
100+
| Version | Feature | Status |
101+
| ------- | ------- | ------ |
102+
| **v0.4** | Streamable HTTP transport | 🟢 90% done |
103+
| **v0.5** | MCP Resources — browsable schema | 🟡 40% done |
104+
| **v0.6** | MCP Prompts — workflow templates | 🔴 Planned |
105+
| **v1.0** | On-Behalf-Of auth (OBO) | 🔴 Planned |
106+
107+
[→ Full Roadmap](https://codeurali.github.io/mcp-dataverse/roadmap)
89108

90109
---
91110

dist/dataverse/dataverse-client-advanced.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,11 @@ export declare class DataverseAdvancedClient extends DataverseBatchClient {
4343
published: boolean;
4444
message: string;
4545
}>;
46+
listDataverseWorkflows(params: {
47+
category?: number;
48+
top?: number;
49+
nameContains?: string;
50+
}): Promise<Record<string, unknown>[]>;
51+
getDataverseWorkflow(workflowId: string): Promise<Record<string, unknown>>;
4652
}
4753
//# sourceMappingURL=dataverse-client-advanced.d.ts.map

0 commit comments

Comments
 (0)