MCP Server ​
The @richview/mcp-server package exposes RichView functionality as Model Context Protocol tools, resources, and prompts for AI agent integration.
Setup ​
Claude Desktop (stdio transport) ​
Add to your Claude Desktop configuration (claude_desktop_config.json):
json
{
"mcpServers": {
"richview": {
"command": "npx",
"args": ["@richview/mcp-server"]
}
}
}HTTP transport ​
For remote clients, start the server in HTTP mode:
bash
npx @richview/mcp-server --http
npx @richview/mcp-server --http --port 3001Endpoints:
POST /mcp-- MCP Streamable HTTP endpointGET /health-- Health checkGET /debug-- Server capability catalog
Tools ​
All tools use the richview.* namespace.
| Tool | Description |
|---|---|
richview.generate-report | Generate an HTML report from a report schema |
richview.verify-report | Run verification assertions against a report |
richview.validate-schema | Validate a JSON object against the report schema |
richview.add-section | Add a new section to an existing report |
richview.update-section | Update an existing section by ID |
richview.remove-section | Remove a section by ID |
richview.reorder-sections | Reorder sections by providing a new ID list |
richview.describe-report | Generate a text description for self-verification |
richview.diff-report | Compare two report versions |
richview.lint-report | Check for quality issues and best practices |
richview.stats-report | Get comprehensive report statistics |
richview.merge-reports | Combine multiple reports into one |
richview.template-report | Create a report from a built-in template |
richview.transform-report | Apply transformations (filter, slice, strip, anonymize) |
richview.summary-report | Generate a compact text summary |
richview.inspect-report | Deep introspection: data profiling, coverage |
richview.extract-data | Extract structured data from report sections |
Resources ​
| URI | Description |
|---|---|
richview://schemas/report | Complete JSON Schema for a RichView report |
richview://themes/default-dark | Dark mode design tokens |
richview://themes/default-light | Light mode design tokens |
richview://guide | Comprehensive agent guide for creating reports |
richview://examples/{name} | Example report schemas (parameterized) |
Prompts ​
Prompt templates for common report types:
| Prompt | Description |
|---|---|
richview.analysis-report | Data analysis report |
richview.executive-summary | Executive summary |
richview.portfolio-report | Investment or portfolio report |
richview.competitive-analysis | Competitive landscape report |
richview.incident-postmortem | Incident postmortem |
richview.data-quality-report | Data quality assessment |
richview.sales-report | Sales performance report |
richview.technical-spec | Technical specification |
Programmatic usage ​
typescript
import { createServer } from "@richview/mcp-server";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
const server = createServer();
const transport = new StdioServerTransport();
await server.connect(transport);For HTTP transport:
typescript
import { startHttpServer } from "@richview/mcp-server";
const { url, close } = await startHttpServer({ port: 3001 });
console.log(`MCP server at ${url}/mcp`);