MCP
MCP is best for MCP-capable clients/agents that need generation tools over stdio.
When To Use This
- You are integrating AnyWayData as an MCP tool provider.
- You need stdio transport for agent tooling.
Quick Start
From the repo root of grid-table-editor:
pnpm --filter @anywaydata/mcp run start
MCP runs over stdio (not HTTP).
Local Run
Preferred MCP server launch commands in host configs:
Published package via npx:
{
"mcpServers": {
"anywaydata": {
"command": "npx",
"args": ["-y", "@anywaydata/mcp"]
}
}
}
Local repo command:
{
"mcpServers": {
"anywaydata-local": {
"command": "node",
"args": ["apps/mcp/src/index.js"],
"cwd": "D:/github/grid-table-editor"
}
}
}
Windows-safe package launch alternative:
{
"mcpServers": {
"anywaydata": {
"command": "node",
"args": ["-e", "import('@anywaydata/mcp')"]
}
}
}
Docker Run
Build from the repo root of grid-table-editor:
docker build -f apps/mcp/Dockerfile -t anywaydata-mcp .
Example MCP host config using Docker:
{
"mcpServers": {
"anywaydata-docker": {
"command": "docker",
"args": ["run", "--rm", "-i", "anywaydata-mcp"]
}
}
}
Notes:
-iis required for stdio.- No
-pmapping is needed. - Add volume mounts if your host/client needs shared files.
Tools and Notes
Common tools include:
generate_data_from_specamend_data_from_specget_output_format_options_schema
Important:
- MCP enforces safe faker argument validation (literal args only by default).
amend_data_from_specacceptsstreamfor compatibility but ignores it (always buffered).- MCP does not expose OpenAPI/Swagger.
- For HTTP/OpenAPI use cases, see REST API.
amend_data_from_spec behavior:
- requires
textSpec,inputData, andinputFormat - optional
rowCountdefaults to imported row count - if
rowCountis smaller than imported rows, only firstNrows are amended - output always includes the full resulting dataset
Example tools/call payload:
{
"jsonrpc": "2.0",
"id": 15,
"method": "tools/call",
"params": {
"name": "amend_data_from_spec",
"arguments": {
"textSpec": "Name\nUpdated Name\nStatus\nActive",
"inputData": "\"Name\",\"Age\"\n\"Alice\",\"30\"\n\"Eve\",\"40\"\n",
"inputFormat": "csv",
"rowCount": 2,
"outputFormat": "json",
"stream": true
}
}
}