TALXIS.CLI.MCP 1.14.2

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.

                    
dotnet tool install --global TALXIS.CLI.MCP --version 1.14.2
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local TALXIS.CLI.MCP --version 1.14.2
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=TALXIS.CLI.MCP&version=1.14.2
                    
nuke :add-package TALXIS.CLI.MCP --version 1.14.2
                    

TALXIS CLI MCP Server

A Model Context Protocol server for Power Platform and Dataverse development. Works with GitHub Copilot, Claude Code, VS Code, and any MCP-compatible client.

Prerequisites

Setup

GitHub Copilot CLI

Add to ~/.copilot/mcp-config.json:

{
  "mcpServers": {
    "TXC": {
      "type": "stdio",
      "command": "dnx",
      "args": ["TALXIS.CLI.MCP", "--yes"]
    }
  }
}

VS Code / GitHub Copilot Chat

Add to .vscode/mcp.json in your project:

{
    "servers": {
        "TALXIS CLI": {
            "type": "stdio",
            "command": "dnx",
            "args": ["TALXIS.CLI.MCP", "--yes"]
        }
    }
}

Claude Code

claude mcp add --transport stdio txc -- dnx TALXIS.CLI.MCP --yes

No install needed — dnx downloads and runs the server on demand.

NuGet

Features

  • Tool Discovery & Execution — Dynamically discovers and exposes all TALXIS CLI commands as MCP tools with typed input schemas
  • Task-Augmented Execution — Long-running tools (deploy, import) support the MCP tasks protocol for async "call-now, fetch-later" execution with cancellation support
  • Structured Logging — Streams real-time log output from CLI subprocesses to MCP clients via notifications/message
  • Progress Notifications — Emits notifications/progress during long-running tool calls when the client provides a progressToken
  • Workspace Roots — Requests the client's workspace roots via roots/list and uses the primary root as the subprocess working directory
  • Log Redaction — Automatically redacts passwords, tokens, and filesystem paths from log output

Developing and Debugging Locally

When developing the MCP server locally, you can run it directly from source and configure VS Code to use your local build. In your .vscode/mcp.json, set the server command to launch the project via dotnet run:

{
    "inputs": [],
    "servers": {
        "TALXIS CLI Dev": {
            "type": "stdio",
            "command": "dotnet",
            "args": [
                "run",
                "--project",
                "${workspaceFolder}/src/TALXIS.CLI.MCP/TALXIS.CLI.MCP.csproj"
            ]
        }
    }
}
  • Adjust the path in args to match your local project location if needed.
  • This setup allows you to test changes without reinstalling the global tool.

Testing and Debugging

Interactive Manual Testing

You can use the Model Context Protocol Inspector for interactive inspection:

npx @modelcontextprotocol/inspector dotnet run --project src/TALXIS.CLI.MCP

Note: The Inspector is an interactive web browser application designed for manual testing and exploration. It is not suitable for automated testing scenarios.

Command Line Debugging & Automated Testing

For debugging or automated testing, you can interact with the MCP server using JSON-RPC messages over stdin/stdout:

# Start the server
dotnet run --project src/TALXIS.CLI.MCP

# Then send JSON-RPC messages via stdin (one per line):
# 1. Initialize the connection (required by MCP protocol)
{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "test-client", "version": "1.0.0"}}}

# 2. List available tools
{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}

# 3. Call a specific tool (example)
{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "tool-name", "arguments": {}}}

# 4. Call a tool with progress tracking
{"jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": {"name": "environment_deploy", "arguments": {"Package": "MyPackage"}, "_meta": {"progressToken": "my-progress-1"}}}

# 5. Call a long-running tool as a task (returns immediately with task ID)
{"jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": {"name": "environment_deploy", "arguments": {"Package": "MyPackage"}, "task": {}}}

# 6. Poll task status
{"jsonrpc": "2.0", "id": 6, "method": "tasks/get", "params": {"taskId": "<task-id-from-step-5>"}}

# 7. Get task result (blocks until complete)
{"jsonrpc": "2.0", "id": 7, "method": "tasks/result", "params": {"taskId": "<task-id-from-step-5>"}}
Example JSON-RPC Messages

To list available tools:

{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {}}

To call a tool (replace arguments as needed):

{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {"name": "workspace_component_create", "arguments": {"ShortName": "pp-entity", "name": "TestEntity", "Param": ["EntityType=InvalidType"]}}}

Auth contract (stdio)

The MCP server never runs an interactive auth flow. Every txc tool subprocess spawned by this server is forced headless — stdout is reserved for JSON-RPC frames and the child has stdin/stdout redirected, so a browser/device-code/masked-prompt attempt would either hang the session or corrupt the transport. CliSubprocessRunner sets TXC_NON_INTERACTIVE=1 unconditionally on every spawn.

Prerequisites, before invoking any tool that touches a Dataverse environment (or any other Connection-bound tool):

  1. On the human's machine, run txc config auth login (interactive browser) or txc config auth add-service-principal once to register a credential and prime the MSAL token cache.
  2. Run txc config connection create <name> --provider dataverse ... to register the endpoint.
  3. Run txc config profile create <name> --auth <alias> --connection <name> to bind them, then txc config profile select <name> (or pin the workspace via txc config profile pin).

After that, MCP tool calls resolve the active profile silently via the acquired token cache or stored SPN secret. If resolution fails (expired refresh token, missing credential, broken config), the subprocess exits non-zero and the MCP server surfaces the error through the tool-call result; the structured log line includes the fail-fast remedy string (txc config profile validate <name>).

Per-call profile override

Any Connection-touching MCP tool accepts an optional profile argument which is forwarded to the child as --profile <name>. This lets a single MCP session switch between profiles per call without restarting the server — e.g. an agent can target customer-a-dev for one tool and customer-b-prod for the next.

Client env allow-list (mcpServers.<name>.env)

The MCP server inherits the client's environment and the child CLI subprocess inherits that. The following are meaningful to txc; anything else is ignored:

Variable Purpose
TXC_PROFILE Select active profile for every call in this MCP session (overridden by per-call profile argument when supplied).
TXC_CONFIG_DIR Override entire config directory (total CI isolation).
TXC_NON_INTERACTIVE Redundant here — MCP already forces this to 1.
TXC_LOG_FORMAT Redundant here — MCP already forces json.
AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID Service-principal fallback for CI / headless runners.
AZURE_FEDERATED_TOKEN_FILE Kubernetes / Azure workload-identity federation.
ACTIONS_ID_TOKEN_REQUEST_URL, ACTIONS_ID_TOKEN_REQUEST_TOKEN GitHub Actions OIDC federation.
TXC_ADO_ID_TOKEN_REQUEST_URL, TXC_ADO_ID_TOKEN_REQUEST_TOKEN Azure DevOps pipelines workload-identity federation (legacy PAC_ADO_* also honored).

Secrets (client secrets, PATs, certificate passwords) are never accepted as plain MCP tool arguments — they are stored in the OS-level secret vault via txc config auth add-service-principal and referenced from config by SecretRef handle only.

Log redaction

McpLogForwarder runs every child stderr JSON log line through LogRedactionFilter before emitting notifications/message to the MCP client. Patterns covered: Bearer <token>, Authorization: headers, bare JWTs, connection-string secret keys (Password, ClientSecret, AccessToken, RefreshToken, etc.) and URL query-param secrets (code=, token=, access_token=). This is the last-chance belt for accidental logger.LogError(ex, ...) leaks where the Dataverse or Microsoft.Identity SDKs embed tokens inside exception messages.

Forbidden patterns (forward-compat for HTTP transport)

When the HTTP/SSE transport ships, txc-mcp will be an OAuth resource server only — Entra ID remains the authorization server. The following patterns are forbidden by the MCP spec and will not be implemented:

  • Token passthrough: never forward a client's bearer token directly to Dataverse — always use on-behalf-of or a separate service account.
  • Tokens in URIs: never embed access tokens in query strings.
  • Non-HTTPS redirects (except loopback for local dev).
  • Missing PKCE: all OAuth flows must use PKCE.
  • Missing audience check: tokens must be audience-bound to the txc-mcp resource URI (RFC 8707).

See docs/mcp-http-auth-notes.md (design notes, no code in v1).


Progressive Disclosure Architecture

The Problem

MCP clients like GitHub Copilot have practical limits on the number of tools they can handle effectively. With 128+ CLI commands registered as MCP tools, the full catalog causes context bloat — the client's LLM spends tokens parsing tool schemas instead of reasoning about the user's task.

The Solution

txc-mcp uses progressive disclosure to expose only a small set of always-on tools at startup, then dynamically injects additional tools as needed:

Always-on tools (9 total):

  • 6 guide tools — guide, guide_workspace, guide_environment, guide_deployment, guide_data, guide_config — domain-scoped tool discovery via LLM sampling
  • execute_operation — bridges same-turn execution for tools discovered by a guide
  • get_skill_details — retrieves public developer-facing skills (documentation, best practices)
  • copilot-instructions — manages .github/copilot-instructions.md for AI assistants

The Workflow

  1. Guide call — The client calls a guide tool (e.g., guide_workspace) with a natural language query describing the task.
  2. Sampling — The guide sends a sampling/createMessage request to the client's LLM with the full internal catalog, asking it to select the most relevant tools. Internal reasoning skills are injected for domain-specific expertise.
  3. Same-turn execution — The guide returns structured results with tool names and schemas. The client can immediately call execute_operation with the selected tool name and arguments — no round-trip needed.
  4. Direct calls (next turn) — Matched tools are injected into the ActiveToolSet. Clients discover injected tools by re-fetching tools/list on subsequent turns, and can then call them directly by name.

Skills Architecture

txc-mcp has a two-tier skills system:

  • Internal skills (proprietary) — Embedded .md files in Skills/Internal/ containing Power Platform development expertise, decision trees, and workflow patterns. These are loaded by GuideReasoningEngine and injected into sampling prompts. They are never exposed to clients — they guide the server's own reasoning.
  • Public skills (developer-facing) — Loaded from TALXIS.CLI.Features.Docs embedded resources. Accessible via the get_skill_details MCP tool and the txc docs CLI command. These contain documentation, best practices, and how-to guides for developers.

Local-First Development Philosophy

Guide tools and internal skills encode a local-first philosophy: prefer local workspace operations (scaffolding, validation, schema inspection) over live environment operations (API calls to Dataverse). Environment operations take 30 seconds to 5 minutes and should only be used for inspection, troubleshooting, or deployment after local validation is complete.


For more details, see the main TALXIS CLI README.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.24.0 123 11/18/2026
1.23.0 114 11/16/2026
1.22.2 204 10/25/2026
1.22.1 121 10/24/2026
1.22.0 145 10/24/2026
1.21.3 131 10/24/2026
1.21.2 152 10/22/2026
1.21.1 236 9/22/2026
1.21.0 176 8/10/2026
1.20.1 181 7/7/2026
1.20.0 167 6/29/2026
1.19.1 178 6/29/2026
1.19.0 151 6/29/2026
1.18.0 151 6/28/2026
1.17.2 165 6/27/2026
1.17.1 182 6/3/2026
1.17.0 169 5/26/2026
1.16.0 156 5/14/2026
1.15.0 147 5/14/2026
1.14.2 153 5/4/2026
Loading failed

1.14.2:
 Fix
 - workspace validate: --file option no longer incorrectly required (65)

1.14.1:
 Fix
 - workspace validate: --file option no longer incorrectly required (65)

1.14.0:
 What's new since v1.13.0

 workspace validate upgrade
 - Replaced manual SchemaValidator + GuidValidator wiring with unified WorkspaceValidator facade
 - Added --file option for single-file validation (validate what you just modified)
 - Errors now include file:line:col locations for precise diagnostics
 - Shows component summary after model loading (entities, forms, views, plugins, flows, etc.)
 - Validates XSD schemas, JSON schemas, duplicate GUIDs, and loads the full metadata model in one pass

 platform-metadata v0.4.0
 - XSD schemas verified against live Dataverse v9.2 exports
 - Power Automate flow JSON parsing and diagnostics
 - Precise source locations (no more hardcoded 1,1)
 - Multi-solution workspace support
 - SchemaIntrospector for component type structure discovery
 - 21+ XSD schemas covering all major component types

 Other changes since v1.13.0
 - Bumped platform-metadata from v0.1.3 through v0.2.0, v0.3.0 to v0.4.0
 - Package icon updates

1.13.0:
 workspace validate command
 - New txc workspace validate <path> — validates solution XML against XSD schemas and checks for duplicate GUIDs
 - Powered by TALXIS.Platform.Metadata.Validation

 OptionSet command restructure
 - Moved from entity optionset global/option to environment optionset
 - optionset show --name / --entity + --attribute for global and local
 - --label and --value lookups for piping
 - --language flag for multi-language environments
 - option add/remove follows noun/verb convention

 Metadata-aware data operations
 - record create and bulk create auto-wrap OptionSetValue, Money, EntityReference
 - Multi-select picklists supported (JSON arrays)
 - Fresh metadata per operation (no cache)

 Post-action transaction rollback
 - Failed scaffolding rolls back all changes (template files + post-action modifications)
 - Snapshots .sln/.slnx file above output directory
 - 120s script timeout with deadlock-free stdout/stderr capture
 - 5 unit tests for PostActionTransaction

 Other
 - Prerequisites checker validates pwsh before scaffolding
 - Emojis removed from guide tool responses
 - ModelPreferences for guide sampling (speed=0.8, cost=0.6, intelligence=0.4)
 - MCP-first README with dnx setup for VS Code, Claude Code, Copilot CLI
 - Cross-solution workflow documented (Behavior=Existing)
 - dotnet-script removed from prerequisites (.NET 10 file-based apps)
 - OptionMetadataInput.ParseCsv shared helper (removed ChangesetApplier duplicate)
 - LabelHelper for language-aware label resolution

1.12.0:
 Data operations — metadata-aware type wrapping
 - Record create/update and bulk create/update/upsert auto-detect column types from Dataverse metadata
 - OptionSet values: pass plain integers (e.g. 375970000) — auto-wrapped to OptionSetValue
 - Money fields: pass decimals — auto-wrapped to Money
 - Lookups: pass bare GUID strings for single-target lookups — auto-wrapped to EntityReference
 - Multi-select picklists: pass JSON arrays of integers — auto-wrapped to OptionSetValueCollection
 - Fresh metadata per operation (no cache — CLI mutates schema)

 OptionSet command restructure
 Moved from entity optionset global/option (4–5 levels) to environment optionset (2 levels):
 - optionset list — all global option sets
 - optionset show --name <name> or --entity E --attribute A — values + labels
 - optionset show --label "Box" — label → value lookup (for piping)
 - optionset show --value 375970000 — value → label lookup
 - optionset show --language 1029 — specific language (LCID)
 - optionset option add/remove — noun/verb convention
 - --name everywhere (removed --global-optionset)

 Entity describe enriched
 - Shows OptionSet name column for picklist/status/state columns

 Other
 - MCP roots warning when client doesn't support workspace roots
 - dotnet sln add: fixed potential deadlock, stdout logged on success
 - Removed auto-version-bump CI job (tag is version source of truth)
 - Cross-repo local dev instructions in README

1.11.0:
 What's New in v1.11.0

 New Skills

 - Data Querying — decision guide for SQL vs OData vs FetchXML, covering $apply aggregation, $expand, formatted values, and pagination patterns
 - Security Roles — scaffolding chain for security roles, role privileges, and app security roles with privilege type/level reference

 Skill Enrichments

 - Schema Management — metadata propagation delays, column naming anti-patterns, lock contention guidance
 - Data Migration — adaptive chunk sizing, FK-ordered import, lookup resolution strategies
 - Form XML Reference — control ClassId table for all 11 types, form type codes, view querytype values
 - Troubleshooting — common Dataverse hex error codes with recovery actions

 Fixes

 - Deployment skill no longer recommends --wait on import
 - Plugin skill now includes build-first guidance before deployment
 - Added dotnet-script prerequisite note to relevant skills

1.10.0:
 What's New in v1.10.0

 Solution Unpack Command

 - txc env sln unpack — unpack a solution ZIP into a folder using SolutionPackager, without needing to export from an environment first

 MCP Error Reporting

 - Error details from workspace scaffolding (post-action failures, script errors) are now surfaced to MCP clients as structured output instead of being swallowed silently
 - Post-action errors include stderr content and exit codes with ANSI escape code stripping

 Scaffolding Concurrency Fix

 - Concurrent workspace_component_create calls from MCP agents are now serialized per workspace root, preventing race conditions on shared files (Solution.xml, .sln)

 Skill Documentation Fixes

 - Fixed incorrect template names in 5 skills (plugin, bpf, custom-api, pcf, form-xml)
 - Clarified publisher prefix limit as a convention (5 chars recommended) vs CLI enforcement (2-8 chars)
 - Added parameter convention docs and schema validation workflow to component creation skill

1.9.0:
 What's New in v1.9.0

 MCP Progressive Disclosure

 The MCP server has been completely redesigned. Instead of exposing 97 static tools (which consumed 76% of the VS Code/Copilot 128-tool hard cap and ~55K tokens of context), the server now uses 9 always-on tools with progressive disclosure:

 - Domain-specific guide tools (guide_workspace, guide_environment, guide_deployment, guide_data, guide_config) use MCP sampling to understand what the agent needs, then produce multi-step recipes with concrete operation calls, validation checkpoints, and error recovery
 - execute_operation — same-turn bridge that runs any CLI operation, with destructive safety enforcement
 - get_skill_details — public knowledge base with 14 skills covering common workflows (entity scaffolding, solution deployment, CMT tuning, build error recovery, and more)
 - txc docs list/show — CLI commands for browsing the skills knowledge base outside of MCP
 - Local-first steering — guide prompts encode preference for instant workspace operations over live environment round-trips
 - New Roslyn analyzers (TXC010-TXC013) enforce description quality, context requirements, destructive signaling, and workflow classification at build time

 Breaking: MCP clients must support sampling. The static 97-tool surface is no longer exposed.

 Fixes

 - Fixed component layer commands (list, show, remove-customization) silently exiting with code 2 due to a stray return statement — all three commands were non-functional in v1.8.0

1.8.0:
 What's New in v1.8.0

 Adds comprehensive solution management, component inspection, dependency analysis, and publisher management. Also improves CLI naming consistency and error reporting.

 Solution Management

 - txc env sln show — view solution details with component type breakdown
 - txc env sln create / delete — create and delete unmanaged solutions
 - txc env sln export — export and unpack solutions via SolutionPackager, or --zip for raw export
 - txc env sln pack — pack an unpacked solution folder into a ZIP
 - txc env sln publish — publish all or selective entity customizations
 - txc env sln import — now accepts folders (auto-packs) and .cdsproj/.csproj project directories
 - txc env sln uninstall — now validates solution type (rejects unmanaged with guidance) and runs dependency pre-check by default
 - txc env sln uninstall-check — pre-uninstall dependency safety check
 - txc env sln component list / count / add / remove — manage solution components with --type and --entity filters

 Component Inspection

 All commands support two identification modes: --id/--type for automation, or --entity/--attribute for human-friendly name-based lookup (resolves MetadataId automatically).

 - txc env component layer list — show solution layer stack for a component
 - txc env component layer show — view active layer definition as JSON
 - txc env component layer remove-customization — remove unmanaged active layer with safety checks
 - txc env component dep list — what depends on this component
 - txc env component dep required — what this component requires
 - txc env component dep delete-check — can I safely delete this?

 Publisher Management

 - txc env publisher list / show / create / delete — full publisher CRUD with prefix and option value prefix validation

 CLI Consistency Improvements

 - Standardized --yes description across all destructive commands
 - Added -o/-i short aliases for --output/--input options
 - Restructured optionset commands: optionset create-global is now optionset global create
 - env setting update now uses positional arguments: txc env setting update <name> <value>
 - Entity attribute commands use positional --entity argument instead of named option
 - Prevented auto-generated alias conflicts on all group commands

 Error Reporting

 - OData queries now surface Dataverse error messages instead of generic SDK exceptions
 - SQL and OData query errors include the entity set name for context
 - Connection creation warns if hostname is unreachable (non-blocking DNS check)
 - Record command GUID arguments now validate with clear messages instead of raw parse errors
 - All commands write structured error envelopes to stdout on failure, so scripts and MCP consumers get { "status": "failed", "message": "..." } instead of empty output

1.7.0:
 What's New in v1.7.0

 A major release bringing Dataverse schema management, Configuration Migration Tool support, full data operations, and significant quality-of-life improvements.

 Dataverse Schema Management

 - Entity management — create, update, and delete entities directly from the CLI with support for standard, activity, and elastic table types
 - Attribute management — create, get, update, and delete attributes across 16 types (string, number, choice, lookup, polymorphic lookup, file, image, and more)
 - Relationships — create, list, and delete entity relationships
 - Global option sets — create, delete, add/remove options, and list global option sets
 - Attribute introspection — attribute type list and type describe with JSON schema output for MCP consumers

 Configuration Migration Tool (CMT)

 - txc data package export — export data packages with file column support and overwrite control
 - txc data package import — enhanced with batch mode, batch size, safety overrides, and prefetch limit

 Changeset Staging

 - Stage schema changes — use --stage on any of the 17 mutating commands to queue changes instead of applying immediately
 - Apply strategies — txc env changeset apply with batch (ExecuteMultiple), transaction (ExecuteTransaction), or bulk (CreateMultiple/UpdateMultiple) strategies
 - Review and discard — txc env changeset status and txc env changeset discard
 - Batches entity creation via CreateEntities API and consolidates publishes into a single PublishXml call

 Dataverse Data Operations

 - Query your data — SQL (txc env data query sql), FetchXML, and OData queries with automatic pagination
 - Record operations — get, create, update, delete individual records or work in bulk with bulk create/update/upsert
 - File columns — download and upload file/image column data with chunked transfers
 - Relationship records — associate and disassociate N:N relationship records
 - Entity introspection — list entities and describe their columns with txc env entity list/describe

 Unified Environment Settings

 - One command for all settings — txc env setting list and txc env setting update work across all four Power Platform settings APIs transparently
 - No need to know which backend stores which setting — the CLI handles routing automatically

 Authentication and Token Handling

 - Tokens no longer expire mid-session — automatic refresh with proactive renewal before expiration
 - Service principal tokens persist across CLI invocations — no more re-authenticating every time
 - Token diagnostics — txc config auth show <alias> --check-token to inspect token health
 - Smarter profile setup — txc config profile create reuses existing connections and auto-populates environment metadata

 Production Safety

 - Destructive commands are blocked against production environments by default
 - Pass --allow-production explicitly when you intend to modify production — an extra safety net on top of --yes confirmation
 - Production environments detected automatically by type, URL, and name patterns

 Consistent Output

 - All commands now follow a unified output format — predictable JSON when piped, human-readable tables in the terminal
 - Global --format flag replaces per-command --json flags
 - Clean stdout — diagnostic and log output goes to stderr, so piping and scripting just works

 Fixes

 - Fixed ConnectedOrgVersion returning hardcoded 9.0.0.0 with token-provider auth
 - Fixed exit codes for validation errors (now correctly returns exit code 2)
 - Fixed MSAL token cache for headless CI environments
 - Numerous XrmShim compatibility fixes