Content
# MeterSphere MCP Server (Model Context Protocol)
This project implements an MCP Server for API testing based on the Model Context Protocol (MCP) specification, allowing LLM clients (such as VS Code, Claude, Cursor, etc.) to invoke testing services, obtain interface definitions, execute test cases, and return results through a standardized protocol.
## Introduction
The MeterSphere MCP Server (Model Context Protocol Server) establishes a connection with the MCP Client via HTTP + SSE, STDIO, or Docker channels, exposing testing-related tools and resources to LLMs. As an intelligent bridge between the testing platform and the development environment, it completely breaks down the barriers between testing and development, enabling developers to directly access, execute, and analyze testing resources within their IDE, code editors, or AI assistants without switching tools. Developers can use natural language commands to allow large models to invoke underlying testing capabilities, achieving full-process operations such as interface testing, document retrieval, Mock service creation, and compatibility verification. This shifts testing left into the development phase, significantly shortening the feedback loop and enhancing development efficiency. Additionally, testing assets configured by the testing team (such as test case libraries, environment configurations, assertion rules, etc.) can be seamlessly accessed by developers, ensuring unified testing standards and promoting integrated DevTestOps practices. Clients can discover and invoke tools to perform functional testing, interface testing, interface document retrieval, and various other scenarios, achieving 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 Example
### 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_TYPE` (http-sse | stdio | docker)
- `AK/SK` (authentication keys)
- `MeterSphereURL` (address of the deployed MeterSphere platform)
## Security and Permissions
- Supports AK/SK authentication.
- Management role permissions, allowing only authorized roles to invoke sensitive tools (such as `Project Data Retrieval and Processing`).
You Might Also Like
Ollama
Ollama enables easy access to large language models on various platforms.

n8n
n8n is a secure workflow automation platform for technical teams with 400+...
OpenWebUI
Open WebUI is an extensible web interface for customizable applications.

Dify
Dify is a platform for AI workflows, enabling file uploads and self-hosting.

Zed
Zed is a high-performance multiplayer code editor from the creators of Atom.
MarkItDown MCP
markitdown-mcp is a lightweight MCP server for converting various URIs to Markdown.