Content
# MeterSphere MCP Server (Model Context Protocol)
This project implements an MCP Server for API testing based on the Model Context Protocol (MCP) specification, enabling LLM clients (such as VS Code, Claude, Cursor, etc.) to call test services, obtain interface definitions, execute test cases, and return results through a standardized protocol.
## Introduction
The MeterSphere MCP Server establishes a connection with the MCP Client via HTTP + SSE, STDIO, or Docker channels, exposing test-related tools and resources to LLMs. As an intelligent bridge between test platforms and development environments, it breaks down the barriers between testing and development, allowing developers to access, execute, and analyze test resources directly in their IDEs, code editors, or AI assistants without switching tools. Developers can use natural language commands to invoke underlying test capabilities through large models, achieving interface testing, document retrieval, Mock service creation, compatibility verification, and other full-process operations. This shifts testing to the left, into the development phase, significantly shortening the feedback loop and improving research and development efficiency. Additionally, test teams can configure test assets (such as case libraries, environment configurations, assertion rules, etc.) to be seamlessly called by developers, ensuring unified test standards and promoting DevTestOps integration practices. Clients can discover and call tools to execute functional testing, interface testing, interface documentation retrieval, and other scenarios, realizing intelligent, automated, and collaborative testing processes.
## Installation and Running
```bash
git clone https://github.com/metersphere/metersphere-mcp-server.git
cd metersphere-mcp-server
mvn clean install
```
## Core Features
## Client Configuration Examples
### VS Code
// .vscode/settings.json
```
{
"servers": {
// SSE Connection Configuration
"ms-mcp-server-sse": {
"type": "sse",
"url": "http://localhost:8000/sse",
"headers": {
"accessKey": "your-access-key",
"signature": "your-signature",
"meterSphereUrl": "http://your-metersphere-url"
}
},
// Docker Connection Configuration
"ms-mcp-server-docker": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-p",
"8000:8000",
"-e", "accessKey=${env:accessKey}",
"-e", "signature=${env:signature}",
"-e", "meterSphereUrl=${env:meterSphereUrl}",
"metersphere-mcp-server"
],
"env": {
"accessKey": "your-access-key",
"signature": "your-signature",
"meterSphereUrl": "http://your-metersphere-url"
}
}
}
}
```
### Claude Client
```
{
"mcp_providers": {
// SSE Connection
"metersphere-sse": {
"protocol": {
"type": "sse",
"baseUrl": "http://localhost:8000",
"path": "/sse"
},
"auth": {
"type": "header",
"headers": {
"accessKey": "your-access-key",
"signature": "your-signature",
"meterSphereUrl": "http://your-metersphere-url"
}
},
"defaults": {
"env": "dev"
}
},
// Docker Connection
"metersphere-docker": {
"protocol": {
"type": "stdio",
"command": "docker run -i --rm -p 8000:8000 metersphere-mcp-server"
},
"env": {
"accessKey": "your-access-key",
"signature": "your-signature",
"meterSphereUrl": "http://your-metersphere-url"
},
"defaults": {
"env": "staging"
}
}
},
// Default Provider
"default_provider": "metersphere-sse"
}
```
## Configuration and Deployment
- `PORT` (HTTP port, default 8000)
- `MCP_TPYE` (http-sse | stdio | docker)
- `AK/SK` (authentication keys)
- `MeterSphereURL` (deployed MeterSphere platform address)
## Security and Permissions
- Supports AK/SK authentication.
- Manages role permissions, allowing only authorized roles to call sensitive tools (such as `project data retrieval and processing`).
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.