MCP Server
The Power Portals Pro MCP server gives AI coding assistants first-hand knowledge of this framework while you build. It is a Model Context Protocol server, it ships with the framework, and there is no licence key and nothing to sign up for.
Why it exists
Two things an agent cannot get from documentation alone, and both of them cause broken code:
- The API surface is too large to remember. Several hundred components across both stacks, each with dozens of parameters. An agent that half-remembers a parameter name writes something plausible that does not compile — or worse, compiles and does nothing.
- Your Dataverse is not in any document. Table and column logical names, relationship schema names, option-set values and — above all — saved view GUIDs exist only in your environment. Every code sample on this site writes a view id as an ellipsis, because there is nothing else it could write.
What it answers
- The framework — the full parameter and prop reference for every component on both stacks with types, defaults and permitted values; complete working samples taken verbatim from this site; the guides; the conventions from
AGENTS.md; and the Blazor-to-React parity matrix. It is version-matched to the packages you have installed. - Your environment, read-only — the tables and columns you actually have, which editor each column maps to, relationship names, option-set values, and your saved views with their real GUIDs.
Note
Every Dataverse tool reads metadata. None of them reads, writes or deletes a record, so pointing an agent at a production environment lets it learn the shape of your data without being able to touch it.
Adding it to a project
Two places it can live
There is a chicken-and-egg here worth being explicit about. The templates write the configuration into the project they create — but the server is at its most useful before that project exists, when you are choosing a template and its options. So install it once for yourself, and let the per-project file take over from there.
Once per machine, for any folder
This makes the server available everywhere, including an empty folder you are about to scaffold into. It can then answer which template to use, what the options mean, and what to configure afterwards. Deliberately unpinned, so it tracks the latest release:
claude mcp add --scope user powerportalspro -- dnx PowerPortalsPro.Mcp --yes
Visual Studio reads a user-level .mcp.json from your profile folder, Cursor uses ~/.cursor/mcp.json, and VS Code has a user-level MCP configuration in its settings. Each takes the same servers block.
Per project, pinned to its version
Projects created from the Power Portals Pro templates are wired up already: the template writes a .mcp.json at the solution root, pinned to the matching server version. There is nothing to do.
To add it to an existing project, create that file yourself at the root of your solution:
{
"servers": {
"powerportalspro": {
"type": "stdio",
"command": "dnx",
"args": [ "PowerPortalsPro.Mcp", "--yes" ]
}
}
}
Which file your editor reads
Visual Studio 2022 17.14+ and Visual Studio 2026 read
.mcp.jsonfrom the solution folder, and so does Claude Code. VS Code reads.vscode/mcp.jsonand Cursor reads.cursor/mcp.json— both use the sameserversblock, so copy it across.
dnx ships with the .NET 10 SDK, which you already have: every Power Portals Pro project is hosted by ASP.NET Core, React SPAs included. The first run downloads the package and caches it.
Having both is the intended setup. The two entries use the same server name, so a client that understands both scopes uses the project's — which means you get the version-matched answers inside a project, and the latest ones anywhere else.
Checking it is working
Ask your assistant something only the server can answer — for example “use get_component_api to show me every parameter on MainGrid”. If the tool is not available, the client has not picked up the configuration file; most need a restart after it is added.
Connecting to Dataverse
The documentation tools need no configuration at all. The metadata tools need a connection to your environment, and that connection belongs to the folder, not to the machine. Run this once in the project:
dnx PowerPortalsPro.Mcp login
One environment per folder
That binds this folder to one environment. If you work across several customers, every project stays signed in to its own environment and agents in different folders never cross over. This is the one thing pac auth select cannot do — it switches a single machine-wide profile, so changing customer in one place changes it everywhere.
Sign-in uses the device-code flow by default, so it works over SSH, inside a container and in WSL, and you can finish it on a phone. Pass --browser if you would rather open one.
Where things are stored
- The binding —
.ppp/mcp.jsonin the folder. It names the environment and the account, holds no secrets, and is safe to commit: a teammate cloning the repository is pointed at the right environment without being told. - Your token — kept in your user profile and encrypted by the operating system keystore (DPAPI on Windows, Keychain on macOS, libsecret on Linux). It is never written into the repository. If no keystore is available the sign-in refuses rather than leaving a refresh token on disk in the clear.
The token cache is keyed by environment, so a second clone of the same customer's repository does not ask you to sign in again, while a different customer always does.
Commands
All of these act on the current folder unless you pass --workspace.
login— sign in and bind this folder to an environment. Options:--environment <url>,--pac-profile <name>,--username <upn>,--tenant <id>,--browser.status— which environment this folder uses, where that came from, which account is cached, and whether the connection works.logout— unbind the folder. Add--forgetto remove the saved sign-in as well.environments— list the Power Platform CLI profiles available to mirror.
Other ways to connect
The environment and credentials are resolved in this order, so the most explicit statement of intent wins:
- Environment variables —
PPP_D365_URL,PPP_D365_CLIENT_IDandPPP_D365_CLIENT_SECRETin the server'senvblock. A service principal, and the way to wire this up in CI or a shared container. - The folder's sign-in — written by
login. The normal path. - The project's own settings — the same
D365:Url,D365:ClientIdandD365:ClientSecret(orD365:Secret) the portal itself reads from user secrets andappsettings. A configured Power Portals Pro project therefore often needs no sign-in at all.
Power Platform CLI profiles
If you already keep environments in pac, you can start from one rather than hunting for a URL:
dnx PowerPortalsPro.Mcp environments
dnx PowerPortalsPro.Mcp login --pac-profile "Acme Dev"
The CLI has no command that hands out an access token, and it keeps credentials in its own store, so its session cannot be reused directly. What --pac-profile does is take the environment and the account from a profile and sign in as that account — usually without prompting, because you already have a session.
Note
The CLI's own active profile is never changed.
pac auth selectis deliberately not used: it would move every project at once.
The tools
You rarely need to name a tool — assistants pick them from the descriptions — but it helps to know what is there.
Documentation, always available
search_docs Open questions across the guides, API reference and samples
get_doc One documentation section in full
get_component_api Every parameter or prop, with types, defaults and permitted values
get_example A complete working sample, verbatim
get_page_recipe Guide, both stacks' samples and API links for one topic
list_components Browse what the framework ships
find_parity Whether a component exists on the other stack
get_conventions The golden rules from AGENTS.md
whats_new Release notes
Your environment, once connected
list_tables Find a table's logical name
describe_table Columns, and the editor each one maps to
list_views Saved views with their real GUIDs
list_relationships Schema names for SubGrid and ManyToManyLookupEdit
list_choices Option-set values and labels
dataverse_status Which environment this folder uses, and whether it connects
Getting a new project running
get_setup_plan The steps to a running portal, and what each one needs
get_setup_script A reviewable script that performs them, with your values filled in
check_setup What this folder still needs before the portal will start
Working in other languages
The knowledge the server returns is English, and that is deliberate. Your assistant is the one reading it — you never see a tool response directly — so it translates for you: ask in your own language, and it answers in your own language. What it must not translate is the code. Component, parameter and column names are English in every project, whatever language the conversation is in, so keeping the reference English is what stops an assistant inventing a translated parameter name that does not exist.
Note
Questions that name something —
“MainGrid Ansichten konfigurieren”— already work in any language, because component names are the same everywhere. The tools also tell your assistant to search in English, so questions that name nothing work too.
Troubleshooting
- “No Dataverse environment is bound to this project folder” — run
loginin that folder. Check you are in the folder you think you are:statusprints the workspace root it resolved. - “The saved sign-in is no longer valid” — the refresh token expired or was revoked, or the tenant now requires a fresh interaction. Run
loginagain. - “The operating system keystore is not available” — common on a headless Linux box with no libsecret daemon. Use a service principal there instead, via the
PPP_D365_*environment variables. - Signed in, but the environment rejects the connection — the account authenticated but has no access to that environment. Check the URL, or sign in as a different user with
--username.
