UNHCR Chart Generation MCP Server

UNHCR Chart Generation MCP Server

Enables AI agents to generate UNHCR-styled data visualizations including bar, line, pie, and scatter charts with refugee and population data, returning charts as base64-encoded images.

Category
Visit Server

README

UNHCR Chart Generation MCP Server

This MCP (Model Context Protocol) server in smithery.ai provides tools for generating UNHCR charts using the FastAPI chart generation service. It allows AI agents to create various types of charts (bar, line, pie, etc.) with UNHCR data visualization.

This server interacts with the UNHCR Chart Generation API.

Features

  • Generate various types of charts (bar, line, pie, scatter) with UNHCR data
  • Create population trend charts for refugee data
  • Generate comparison charts with multiple datasets
  • Customize chart titles, labels, and styling
  • Return charts as base64-encoded images for easy integration

Connect to MCP Server

To access the server, open your web browser and visit the following URL: https://smithery.ai/server/@rvibek/mcp_unhcrpyplot

Configure the MCP host/client as needed.

smithery badge

API Endpoint

The server generates charts using the following API endpoint:

  • https://unhcrpyplot.rvibek.com.np/plot

The API accepts JSON payloads with the following structure:

{
  "chart_type": "string",
  "title": "string",
  "subtitle": "string",
  "x_label": "string",
  "y_label": "string",
  "data": {
    "labels": ["string"],
    "values": [number]
  }
}

MCP Tools

The server exposes the following tools:

generate_unhcr_graph

Generate a UNHCR chart using the FastAPI chart generation service.

Parameters:

  • chart_type (required): Type of chart to generate (bar, line, pie, scatter, etc.)
  • title (required): Main title of the chart
  • subtitle (required): Subtitle describing the chart content
  • x_label (required): Label for the x-axis
  • y_label (required): Label for the y-axis
  • labels (required): List of labels for the data points (e.g., years, countries)
  • values (required): List of numerical values corresponding to the labels

Returns:

  • Dictionary containing the chart image as base64 and metadata

generate_comparison_chart

Generate a comparison chart with multiple datasets.

Parameters:

  • chart_type (required): Type of chart (bar, line, etc.)
  • title (required): Main title of the chart
  • subtitle (required): Subtitle describing the chart content
  • x_label (required): Label for the x-axis
  • y_label (required): Label for the y-axis
  • datasets (required): List of datasets, each containing 'label', 'labels', and 'values'

Returns:

  • Dictionary containing the chart image as base64 and metadata

generate_population_trend_chart

Generate a population trend chart for UNHCR data.

Parameters:

  • years (required): List of years for the x-axis
  • population_counts (required): List of population counts for each year
  • country_name (optional): Name of the country or region being visualized (default: "Country")
  • chart_type (optional): Type of chart (line, bar, etc.) (default: "line")

Returns:

  • Dictionary containing the chart image as base64 and metadata

Example Usage

Here's an example of how to use the generate_unhcr_graph tool:

# Generate a bar chart showing refugee population trends
result = generate_unhcr_graph(
    chart_type="bar",
    title="Nepali Refugees and Asylum Seekers in Canada (2020-2021)",
    subtitle="UNHCR Population Data",
    x_label="Year",
    y_label="Number of People",
    labels=["2020", "2021"],
    values=[205, 114]
)

Response Format

Successful chart generation returns:

{
  "status": "success",
  "chart_type": "bar",
  "title": "Chart Title",
  "image_base64": "base64_encoded_image_string",
  "image_format": "png",
  "message": "Successfully generated bar chart: Chart Title"
}

License

MIT

Acknowledgments

This project uses the UNHCR Chart Generation API for creating visualizations of UNHCR data.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured