Karate Server
БесплатноНе проверенProvides AI agents with comprehensive knowledge of the Karate DSL framework for API testing, UI automation, and performance testing.
Описание
Provides AI agents with comprehensive knowledge of the Karate DSL framework for API testing, UI automation, and performance testing.
README
A Model Context Protocol (MCP) server that provides AI agents with comprehensive knowledge of the Karate DSL framework for API testing, UI automation, and performance testing.
Overview
This MCP server enables AI assistants like Claude, GitHub Copilot, and Roo Code to access deep, structured knowledge about Karate DSL, including:
- HTTP Methods - URL, path, request, headers, parameters, cookies, multipart uploads
- Response Handling - Status codes, response body, headers, cookies, timing
- Assertions - Match operators and 18+ fuzzy matchers (#string, #number, #regex, etc.)
- Data Structures - Variables, JSON, XML, YAML, CSV, tables
- JavaScript API - 13+ utility functions for data manipulation
- Data-Driven Testing - Scenario Outline, dynamic Examples, CSV/JSON data
- Code Reusability - Call, callonce, JavaScript functions
- Configuration - Timeouts, SSL, proxy, headers, logging
- Parallel Execution - Multi-threaded test execution
- UI Automation - Cross-browser web testing
- Performance Testing - Gatling integration
- API Mocking - Test doubles and consumer contracts
- Best Practices - 15+ recommended patterns
Features
Available Tools
The MCP server exposes 5 tools:
list_karate_categories- List all 14 Karate DSL categoriessearch_karate_features- Search features within a categoryget_karate_feature- Get detailed info about a specific featuregenerate_karate_example- Generate complete test examplesget_karate_best_practices- Get best practices and recommendations
Knowledge Base
- 14 categories of Karate features
- 100+ features and functions documented
- Syntax examples for every feature
- 6 test templates (GET, POST, Auth, Data-driven, Parallel, UI)
- 15+ best practices for maintainable tests
Installation
Prerequisites
- Node.js 18 or higher
- npm or yarn
From Source
git clone https://github.com/vspaswin/karate-mcp-server.git
cd karate-mcp-server
npm install
npm run build
Usage
With Claude Desktop
Add to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"karate": {
"command": "node",
"args": ["/absolute/path/to/karate-mcp-server/dist/index.js"]
}
}
}
Restart Claude Desktop to connect.
With VS Code (GitHub Copilot)
📖 Complete VS Code Setup Guide
Quick Start
- Open Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) - Run:
MCP: Add Server - Select
Local (stdio) - Name:
karate-dsl - Command:
node - Args:
/absolute/path/to/karate-mcp-server/dist/index.js - Scope:
GlobalorWorkspace
Or create .vscode/mcp.json:
{
"servers": {
"karate-dsl": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/karate-mcp-server/dist/index.js"]
}
}
}
Test: Ask GitHub Copilot: @karate-dsl List all categories
With Roo Code (VS Code Extension)
📖 Complete Roo Code Setup Guide
Quick Start
- Install Roo Code extension in VS Code
- Open Roo Code panel → Click MCP icon (🔌)
- Click "Edit Global MCP"
- Add configuration:
{
"mcpServers": {
"karate-dsl": {
"command": "node",
"args": ["/absolute/path/to/karate-mcp-server/dist/index.js"]
}
}
}
- Save and verify connection in MCP panel
Test: Ask Roo: List all Karate DSL categories
Example Queries
Learning Karate
List all Karate DSL categories
What are all the assertion operators in Karate?
Show me how to use fuzzy matchers like #string and #regex
How do I configure HTTP timeouts?
Explain callonce vs call in Karate
Generating Tests
Generate a complete POST API test example
Show me how to implement authentication with callonce
Create a data-driven test with CSV data
Generate a parallel execution example
Create a UI automation test for login
Building Real Tests
Help me write a Karate test for my REST API at https://api.example.com
I need to test a POST /users endpoint that creates users
How do I assert response time is under 2 seconds?
Show me how to extract and reuse values from responses
Best Practices
What are the best practices for Karate test organization?
How should I structure my Karate project?
Show me patterns for reusing authentication logic
Tool Examples
List All Categories
Query: "List all Karate categories"
Response: Shows all 14 categories with descriptions and item counts
Search Features
Query: "Show me all assertion features"
Tool:
{"name": "search_karate_features", "arguments": {"category": "assertions"}}
Response: 18 assertion features with syntax examples
Get Specific Feature
Query: "How does match contains work?"
Tool:
{"name": "get_karate_feature", "arguments": {"featureName": "match contains"}}
Response: Detailed feature documentation
Generate Example
Query: "Generate a POST API example"
Tool:
{"name": "generate_karate_example", "arguments": {"useCase": "api_post"}}
Response: Complete, runnable test code
Available Test Templates
api_get- GET request with assertions and fuzzy matchersapi_post- POST request with JSON bodyapi_auth- Authentication flow with callonce for token reusedata_driven- Data-driven test with Scenario Outline and Examplesparallel_test- Parallel execution with JUnit runnerui_test- Web UI automation with driver
Development
Build
npm run build
Watch Mode
npm run dev
Project Structure
karate-mcp-server/
├── src/
│ ├── index.ts # MCP server with 5 tools
│ └── karate-knowledge.ts # Karate DSL knowledge base
├── docs/
│ ├── vscode-setup.md # VS Code/Copilot setup guide
│ └── roocode-setup.md # Roo Code setup guide
├── dist/ # Compiled JavaScript
├── package.json
├── tsconfig.json
├── .gitignore
└── README.md
Categories Covered
- http_methods (11 features) - URL, path, method, request, params, headers, cookies, forms, multipart, SOAP, retry
- response_handling (6 features) - Status, response, bytes, headers, cookies, timing
- assertions (18 features) - Match operators, fuzzy matchers (#string, #number, #regex, etc.)
- variables (8 features) - def, text, table, YAML, CSV, JSON, XML, copy
- actions (10 features) - assert, print, get, set, remove, configure, call, eval, read
- javascript_api (13 functions) - log, get, set, jsonPath, map, filter, merge, etc.
- data_driven (4 features) - Scenario Outline, dynamic Examples, CSV/JSON data
- reusability (4 features) - call, callonce, JavaScript functions, parameters
- configuration (5 settings) - Timeouts, SSL, proxy, headers
- parallel_execution (3 features) - Runner, thread configuration, @parallel tag
- ui_automation (4 features) - driver, input, click, screenshot
- performance_testing (2 features) - Gatling integration, load profiles
- mocking (2 features) - Mock servers, stateful mocks
- best_practices (15 tips) - Organization, naming, performance, maintainability
Supported AI Assistants
- Claude Desktop - Native MCP support
- GitHub Copilot (VS Code) - MCP integration in VS Code 1.102+
- Roo Code (VS Code) - AI coding assistant with MCP support
- Any MCP Client - Compatible with any stdio-based MCP client
Technical Details
- Built with @modelcontextprotocol/sdk v1.0+
- Uses stdio transport for local integration
- Type-safe with Zod schema validation
- Comprehensive knowledge base with 100+ features
- 6 ready-to-use test templates
- Works with Claude, Copilot, Roo Code, and other MCP clients
Troubleshooting
Server Not Connecting
- Verify path to
dist/index.jsis absolute and correct - Run
npm run buildto ensure server is compiled - Check Node.js version:
node --version(should be 18+) - Restart your AI assistant / IDE
Tools Not Available
- Verify server shows as "Connected" in MCP panel
- Check configuration file syntax is valid JSON
- Look for error messages in output/console logs
- Try asking directly: "List karate categories"
Permission Issues
- Make
dist/index.jsexecutable:chmod +x dist/index.js - Ensure Node.js has execute permissions
- On Windows, use full path:
C:/Program Files/nodejs/node.exe
Contributing
Contributions welcome! Areas for improvement:
- Additional test examples and templates
- More detailed feature explanations
- CI/CD integration examples
- Video tutorials and demos
- Support for more AI assistants
Resources
- Karate DSL Official Repo
- Karate Documentation
- Model Context Protocol
- MCP TypeScript SDK
- VS Code MCP Documentation
- Roo Code Documentation
License
MIT
Author
vspaswin
Lead Software Engineer | Test Automation Expert
Acknowledgments
- Karate DSL team for the outstanding test automation framework
- Anthropic for the Model Context Protocol specification
- Microsoft & GitHub for VS Code and Copilot MCP integration
- Roo Code team for excellent AI coding assistant
- MCP community for tools and examples
Note: This is an independent community project, not officially affiliated with Karate Labs, Intuit, Microsoft, GitHub, or Anthropic.
Test update
Установка Karate Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/vspaswin/karate-mcp-serverFAQ
Karate Server MCP бесплатный?
Да, Karate Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Karate Server?
Нет, Karate Server работает без API-ключей и переменных окружения.
Karate Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Karate Server в Claude Desktop, Claude Code или Cursor?
Открой Karate Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
LibreOffice Tools
Enables AI agents to read, write, and edit Office documents via LibreOffice with token-efficient design. Supports multiple formats including DOCX, XLSX, PPTX, a
автор: passerbyflutterdannote/figma-use
Full Figma control: create shapes, text, components, set styles, auto-layout, variables, export. 80+ tools.
автор: dannoteLogo.dev
Search and retrieve company logos by brand or domain. Customize size, format, and theme to match your design needs. Accelerate design, prototyping, and content
автор: NOVA-3951PIX4Dmatic
Enables GUI automation for controlling PIX4Dmatic on Windows through MCP. Supports launching, focusing, capturing screenshots, sending hotkeys, clicking UI elem
автор: jangjo123Compare Karate Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории design
