# jhenomm/pp-docs-mcp architecture

> Architecture diagram of the GitHub repository jhenomm/pp-docs-mcp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jhenomm/pp-docs-mcp
- Repository: https://github.com/jhenomm/pp-docs-mcp

## Overview

PP Docs is an MCP server that turns Power Platform exports into structured Markdown or Word documentation, optionally saved to SharePoint. A client submits a request; the server routes single-file or solution workflows, solution inspection produces a component manifest, and selected flows, Copilot topics, and Power Apps screens are documented with an AI provider before output generation. The repository also supports agent-level overviews and direct .msapp screen extraction. The graph follows documented workflows and sampled imports/calls; some server routing and output behavior is established by the README rather than inspected implementation details.

Main entry points: [`src/tools/process-solution.js`](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/process-solution.js) (Solution processor), [`src/index.js`](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/index.js) (MCP server), [`src/tools/document-flow.js`](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/document-flow.js) (Flow docs), [`src/tools/document-copilot-topic.js`](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/document-copilot-topic.js) (Topic docs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Request handling"]
  node_server["MCP server<br/>[index.js]"]
  node_file_tool["File detection<br/>[index.js]"]
end

subgraph group_analysis["Component documentation"]
  node_flow_docs["Flow docs<br/>[document-flow.js]"]
  node_topic_docs["Topic docs"]
  node_app_docs["Power Apps docs"]
  node_agent_docs["Agent overview<br/>[document-agent.js]"]
  node_ai_client["AI provider client<br/>[ai-client.js]"]
end

subgraph group_solution["Solution workflows"]
  node_inspector["Solution inspector"]
  node_solution_processor["Solution processor"]
  node_msapp_extractor["MSAPP extractor<br/>[msapp-extractor.js]"]
end

subgraph group_output["Generation and storage"]
  node_docx["DOCX generator<br/>[generate-docx.js]"]
  node_sharepoint["SharePoint I/O"]
end

node_client(("MCP client"))
node_llm{{"LLM services"}}
node_sp_service[("SharePoint")]

node_client -->|"sends requests"| node_server
node_server -->|"routes requests"| node_file_tool
node_server -->|"inspects solutions"| node_inspector
node_server -->|"processes solutions"| node_solution_processor
node_server -->|"routes flow docs"| node_flow_docs
node_server -->|"routes topic docs"| node_topic_docs
node_server -->|"routes app docs"| node_app_docs
node_solution_processor -->|"uses manifest"| node_inspector
node_solution_processor -->|"documents flows"| node_flow_docs
node_solution_processor -->|"documents topics"| node_topic_docs
node_solution_processor -->|"documents screens"| node_app_docs
node_solution_processor -->|"creates overview"| node_agent_docs
node_solution_processor -->|"extracts screens"| node_msapp_extractor
node_solution_processor -->|"generates documents"| node_docx
node_solution_processor -->|"downloads and uploads"| node_sharepoint
node_inspector -->|"downloads source"| node_sharepoint
node_flow_docs -->|"requests content"| node_ai_client
node_topic_docs -->|"requests content"| node_ai_client
node_app_docs -->|"requests content"| node_ai_client
node_agent_docs -->|"requests overview"| node_ai_client
node_ai_client -->|"calls configured provider"| node_llm
node_flow_docs -->|"generates DOCX"| node_docx
node_flow_docs -->|"uploads output"| node_sharepoint
node_topic_docs -->|"generates DOCX"| node_docx
node_topic_docs -->|"uploads output"| node_sharepoint
node_sharepoint -->|"reads and writes files"| node_sp_service

click node_server "https://github.com/jhenomm/pp-docs-mcp/blob/main/src/index.js"
click node_file_tool "https://github.com/jhenomm/pp-docs-mcp/blob/main/src/index.js"
click node_flow_docs "https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/document-flow.js"
click node_topic_docs "https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/document-copilot-topic.js"
click node_app_docs "https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/document-power-app.js"
click node_agent_docs "https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/document-agent.js"
click node_ai_client "https://github.com/jhenomm/pp-docs-mcp/blob/main/src/ai-client.js"
click node_inspector "https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/inspect-solution.js"
click node_solution_processor "https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/process-solution.js"
click node_msapp_extractor "https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/msapp-extractor.js"
click node_docx "https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/generate-docx.js"
click node_sharepoint "https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/sharepoint-output.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_server,node_file_tool,node_client toneBlue
class node_flow_docs,node_topic_docs,node_app_docs,node_agent_docs,node_ai_client,node_sp_service toneAmber
class node_inspector,node_solution_processor,node_msapp_extractor toneMint
class node_docx,node_sharepoint toneRose
class node_llm toneIndigo
```

## Components

### Request handling

- [MCP server](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/index.js): `src/index.js`
- [File detection](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/index.js): `src/index.js`

### Component documentation

- [Flow docs](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/document-flow.js): `src/tools/document-flow.js`
- [Topic docs](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/document-copilot-topic.js): `src/tools/document-copilot-topic.js`
- [Power Apps docs](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/document-power-app.js): `src/tools/document-power-app.js`
- [Agent overview](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/document-agent.js): `src/tools/document-agent.js`
- [AI provider client](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/ai-client.js): `src/ai-client.js`

### Solution workflows

- [Solution inspector](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/inspect-solution.js): `src/tools/inspect-solution.js`
- [Solution processor](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/process-solution.js): `src/tools/process-solution.js`
- [MSAPP extractor](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/msapp-extractor.js): `src/tools/msapp-extractor.js`

### Generation and storage

- [DOCX generator](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/generate-docx.js): `src/tools/generate-docx.js`
- [SharePoint I/O](https://github.com/jhenomm/pp-docs-mcp/blob/main/src/tools/sharepoint-output.js): `src/tools/sharepoint-output.js`

### Other components

- **MCP client**
- **LLM services**
- **SharePoint**

## Connections

- MCP client → MCP server: sends requests (evidence: `README.md`)
- MCP server → File detection: routes requests (evidence: `README.md`)
- MCP server → Solution inspector: inspects solutions (evidence: `src/index.js`)
- MCP server → Solution processor: processes solutions (evidence: `src/index.js`)
- MCP server → Flow docs: routes flow docs (evidence: `src/index.js`)
- MCP server → Topic docs: routes topic docs (evidence: `src/index.js`)
- MCP server → Power Apps docs: routes app docs (evidence: `src/index.js`)
- Solution processor → Solution inspector: uses manifest (evidence: `src/tools/process-solution.js`)
- Solution processor → Flow docs: documents flows (evidence: `src/tools/process-solution.js`)
- Solution processor → Topic docs: documents topics (evidence: `src/tools/process-solution.js`)
- Solution processor → Power Apps docs: documents screens (evidence: `src/tools/process-solution.js`)
- Solution processor → Agent overview: creates overview (evidence: `src/tools/process-solution.js`)
- Solution processor → MSAPP extractor: extracts screens (evidence: `src/tools/process-solution.js`)
- Solution processor → DOCX generator: generates documents (evidence: `src/tools/process-solution.js`)
- Solution processor → SharePoint I/O: downloads and uploads (evidence: `src/tools/process-solution.js`)
- Solution inspector → SharePoint I/O: downloads source (evidence: `src/tools/inspect-solution.js`)
- Flow docs → AI provider client: requests content (evidence: `src/tools/document-flow.js`)
- Topic docs → AI provider client: requests content (evidence: `src/tools/document-copilot-topic.js`)
- Power Apps docs → AI provider client: requests content (evidence: `src/tools/document-power-app.js`)
- Agent overview → AI provider client: requests overview (evidence: `src/tools/document-agent.js`)
- AI provider client → LLM services: calls configured provider (evidence: `src/ai-client.js`)
- Flow docs → DOCX generator: generates DOCX (evidence: `src/tools/document-flow.js`)
- Flow docs → SharePoint I/O: uploads output (evidence: `src/tools/document-flow.js`)
- Topic docs → DOCX generator: generates DOCX (evidence: `src/tools/document-copilot-topic.js`)
- Topic docs → SharePoint I/O: uploads output (evidence: `src/tools/document-copilot-topic.js`)
- SharePoint I/O → SharePoint: reads and writes files (evidence: `README.md`)
