amis-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@amis-mcp-server create a sales dashboard with a pie chart by region and a line chart trend"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@xiaochen1649/amis-mcp-server
MCP Server for generating AMIS page schemas with AI assistance.
Features
🤖 MCP Protocol - Full Model Context Protocol support for AI integration
📊 8 Chart Types - Pie, Bar, Line, Funnel, Radar, Gauge, Horizontal Bar, Grouped Bar
🎨 Template Engine - Nunjucks-based template rendering
🔧 Customizable - Bring your own templates and component store
📦 Zero Config - Built-in templates for quick start
Related MCP server: Super-MCP
Installation
npm install @xiaochen1649/amis-mcp-serverQuick Start
Standalone CLI
# Demo mode (in-memory components)
npx @xiaochen1649/amis-mcp-server --demo
# With SQLite database
npx @xiaochen1649/amis-mcp-server --db ./database.sqliteMCP Configuration (Claude Desktop / Cursor)
{
"mcpServers": {
"amis": {
"command": "npx",
"args": ["@xiaochen1649/amis-mcp-server", "--demo"]
}
}
}As Library (Programmatic)
import { createMcpServer } from '@xiaochen1649/amis-mcp-server';
// Implement your component store
const componentStore = {
async getActiveComponents() {
// Return components from your database
return [
{
component_id: 'chart_with_ai',
component_name: 'Chart Panel',
description: 'Universal chart component',
template_path: 'components/chart_with_ai.j2',
params_schema: { /* ... */ },
default_params: {}
}
];
},
async getComponentsByIds(ids: string[]) {
// Return components by IDs
}
};
const server = await createMcpServer({
name: 'my-amis-server',
version: '1.0.0',
componentStore
});
await server.start();Template Rendering Only
import { createRenderer } from '@xiaochen1649/amis-mcp-server';
const renderer = createRenderer('./my-templates');
// Render a single component
const chartSchema = renderer.renderComponent('components/chart_with_ai.j2', {
chart_type: 'pie',
title: 'Sales Distribution',
api_url: '/api/sales/distribution'
});
// Assemble a page
const pageSchema = renderer.assemblePage('dashboard', 'My Dashboard', [
chartSchema,
anotherSchema
]);Using Chart Adapters
import { adapters, getAdapterByType } from '@xiaochen1649/amis-mcp-server';
// Get adapter code for AMIS chart component
const pieAdapter = adapters.pie();
const lineAdapter = adapters.line({ smooth: true, showArea: true });
// Or use the generic getter
const adapter = getAdapterByType('bar');MCP Tools
list_components
Get all available components with their parameter schemas.
create_chart (简化工具)
快速创建图表组件,只需指定类型和 API。
Parameters:
chart_type(required) - 图表类型:pie|bar|line|funnelapi(required) - 数据接口地址title- 图表标题height- 图表高度 (默认 400)drilldown_api- 钻取详情接口
Example:
{
"chart_type": "pie",
"api": "/api/sales/distribution",
"title": "销售分布"
}create_page (简化工具)
快速创建包含多个组件的页面。
Parameters:
title- 页面标题layout- 布局模式:simple|dashboarditems(required) - 组件列表
Item 结构:
type(required) - 组件类型:chart|tableapi(required) - 数据接口地址chart_type- 图表类型 (type=chart 时)title- 组件标题columns- 表格列定义 (type=table 时)
Example:
{
"title": "销售分析",
"layout": "dashboard",
"items": [
{ "type": "chart", "chart_type": "pie", "api": "/api/sales/by-region", "title": "区域分布" },
{ "type": "chart", "chart_type": "line", "api": "/api/sales/trend", "title": "销售趋势" },
{ "type": "table", "api": "/api/sales/list", "title": "销售明细" }
]
}generate_page_schema (完整配置)
Generate AMIS page schema from component list. 支持完整的组件配置。
Parameters:
title- Page titlelayout- Layout mode:simple|dashboardcomponents- Array of component references (single page mode)tabs- Array of tab configurations (multi-tab mode)
Example:
{
"title": "Sales Dashboard",
"layout": "dashboard",
"components": [
{
"component_id": "chart_with_ai",
"params": {
"chart_type": "pie",
"title": "Revenue by Region",
"api_url": "/api/sales/by-region"
}
}
]
}Built-in Templates
chart_with_ai.j2
Universal chart component with analysis panel.
Parameters:
Parameter | Type | Description |
chart_type | string | Chart type: pie/bar/line/funnel/radar/gauge/horizontal-bar/grouped-bar |
title | string | Chart title |
api_url | string | Data API URL |
api_method | string | HTTP method (default: get) |
height | number | Chart height (default: 400) |
enable_drilldown | boolean | Enable drill-down (default: true) |
drilldown_api | string | Drill-down API URL |
analysis_label | string | Analysis section label |
suggestion_label | string | Suggestion section label |
stats_cards.j2
Statistics cards component with flexible layout.
alert.j2
Alert/notification component.
Custom Templates
Create your own templates using Nunjucks syntax:
{# my-component.j2 #}
{
"type": "card",
"header": {
"title": "{{ title }}"
},
"body": {{ content | tojson }}
}Error Codes
Code | Description |
1001 | Invalid parameters |
1002 | Missing required parameter |
1003 | Invalid JSON format |
2002 | Component not found |
3001 | Template render failed |
License
MIT
Available Tools
4 toolscreate_chartB
快速创建图表组件。返回可直接使用的 AMIS 图表 schema。
Inputs: api (required), chart_type (required), title, height, +1 more.
create_pageC
快速创建包含多个组件的 AMIS 页面。支持图表和表格组件。
Inputs: items (required), title, layout.
generate_page_schemaB
Generate AMIS page schema from component list. Supports single page mode (components array) or tabs mode (tabs array).
Inputs: tabs, title, layout, components.
list_componentsA
Get all available components with their parameter schemas.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
list_components and create_chart are clearly distinct, but create_page and generate_page_schema both produce AMIS page schemas from component lists, making it hard to know which to pick for a given page-building task. Descriptions hint at a difference (tabs support, explicit components array) but the boundary remains fuzzy.
All tools follow a consistent snake_case verb_noun pattern (list_components, create_chart, create_page, generate_page_schema). Verb choices (create vs generate) vary semantically but the naming convention itself is uniform.
Four tools is on the lean side but reasonable for a schema-generation helper server, with one discovery tool and three creation tools. It could optionally add a validation tool, but nothing feels bloated.
The surface covers discovery, chart creation, and page schema generation, but there is no update/edit or validate operation for generated schemas, and table creation exists only implicitly inside create_page. Agents can work around this but the lifecycle is partial.
Maintenance
Related MCP Connectors
AI Data Components over MCP: working what-if apps, interactive tables and maps, plus 90 chart types.
Build and update complete applications in Apper through AI assistants using MCP.
Direct AI video, image, music and storyboard production from any MCP client.
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI-assisted development by providing a library of 110+ curated prompts, workflows, and coding standards, with MCP tools for prompt retrieval, composition, and multi-step workflow chains.12 npmMIT
- AlicenseNot gradedqualityDmaintenanceDynamically generates MCP tools from any OData or OpenAPI spec, enabling natural-language queries via SAP AI Core.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to compose and edit dashboards through MCP tools, allowing them to manage tabs, widgets, layout, and data bindings via a unified control plane.20MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI to read and modify STARLIMS code, forms, and resources, assisting in page development and configuration through MCP interfaces.MIT