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):
{
"mcpServers": {
"richview": {
"command": "npx",
"args": ["@richview/mcp-server"]
}
}
}HTTP transport ​
For remote clients, start the server in HTTP mode:
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 |
richview.fetch-stock | Fetch stock price data from Yahoo Finance |
richview.fetch-crypto | Fetch cryptocurrency price data from CoinGecko |
richview.fetch-weather | Fetch weather forecast data from Open-Meteo |
richview.fetch-fx | Fetch forex exchange rates from Frankfurter (ECB) |
richview.screenshot-report | Generate a PNG screenshot of a rendered report |
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 |
Data Tools ​
The MCP server includes built-in data fetching tools that require no API keys.
richview.fetch-stock ​
Fetch stock price data from Yahoo Finance. Returns current price, daily change, and up to 20 days of OHLCV history. Supports any ticker symbol. Use exchange suffixes for non-US stocks (e.g., HSBA.L for London).
Input: { symbol: "AAPL" }
richview.fetch-crypto ​
Fetch cryptocurrency price data from CoinGecko. Returns current USD price, 24h change, market cap, and trading volume. Supports common symbols (BTC, ETH, SOL, ADA, DOT, AVAX, MATIC, LINK, DOGE, XRP, BNB, LTC) and CoinGecko IDs.
Input: { symbol: "BTC" }
richview.fetch-weather ​
Fetch current weather conditions from Open-Meteo. Geocodes the location name, then returns temperature (Celsius), humidity, wind speed, and weather description.
Input: { location: "London" }
richview.fetch-fx ​
Fetch forex exchange rates from the Frankfurter API (ECB reference data). Returns the rate between two ISO 4217 currency codes.
Input: { from: "USD", to: "EUR" }
richview.screenshot-report ​
Render a report to HTML and capture a PNG screenshot using headless Chrome. Returns a base64-encoded image. Requires Chrome or Chromium installed on the system.
Input: { report: "<json string>", width?: 1280, height?: 900, theme?: "light" | "dark" }
Environment Variables ​
| Variable | Default | Description |
|---|---|---|
RICHVIEW_OUTPUT_DIR | ./reports | Directory for generated report files |
RICHVIEW_PUBLISH_URL | https://richview.uk | Server URL for publishing reports |
Programmatic usage ​
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:
import { startHttpServer } from "@richview/mcp-server";
const { url, close } = await startHttpServer({ port: 3001 });
console.log(`MCP server at ${url}/mcp`);