-
-
Notifications
You must be signed in to change notification settings - Fork 290
docs: MCP server setup for Claude Code, Cursor, Copilot, Antigravity #814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
a73bc83
58f24b8
5b2efeb
afab49a
3290442
0b4c61a
4cdbcf5
217e767
43cdf85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -66,6 +66,126 @@ Create a `.cursorrules` file in your project root with the same test format refe | |||||||
|
|
||||||||
| Use the same test format documentation as system instructions or project context. | ||||||||
|
|
||||||||
| ## MCP Server (Recommended for AI Agents) | ||||||||
|
|
||||||||
| Keploy provides an MCP (Model Context Protocol) endpoint that gives AI agents **native tool access** to the Automated Test Generation (ATG) platform. Instead of the agent parsing CLI output, it calls structured tools directly and gets typed JSON responses. The CLI workflow described later on this page is an alternative for environments where MCP is not available. | ||||||||
|
|
||||||||
| The MCP endpoint is built into the Keploy API server at `/client/v1/mcp`. Tools are auto-generated from the OpenAPI spec—when the API evolves, tools update automatically. | ||||||||
|
|
||||||||
| ### Available Tools | ||||||||
|
|
||||||||
| | Tool | What it does | | ||||||||
| | -------------------- | ------------------------------------------------------------------------ | | ||||||||
| | `listApps` | List all applications | | ||||||||
| | `createApp` | Create a new application | | ||||||||
| | `generateTestSuites` | Trigger AI test generation from an OpenAPI spec | | ||||||||
| | `runTestSuites` | Execute test suites against a target API | | ||||||||
| | `listTestSuites` | List test suites for an app | | ||||||||
| | `createTestSuite` | Create a test suite from steps JSON | | ||||||||
| | `generate_and_wait` | Generate tests and wait for completion (composite) | | ||||||||
| | `run_and_report` | Run tests and return results with failures and coverage gaps (composite) | | ||||||||
| | `get_coverage_gaps` | Get uncovered endpoints with prioritized suggestions | | ||||||||
| | _...39+ API tools_ | Every `/client/v1` endpoint is available as an MCP tool | | ||||||||
|
|
||||||||
| :::caution API Key Security | ||||||||
| The examples below include an API key in configuration files. **Do not commit API keys to version control.** Use environment variables or add the config file to `.gitignore`. For CI/CD, use secret management. | ||||||||
| ::: | ||||||||
|
|
||||||||
| Replace `https://your-keploy-host` with your Keploy instance URL (e.g., `https://api.keploy.io` for Keploy Cloud, or your self-hosted domain). | ||||||||
|
|
||||||||
| ### MCP Client Configuration | ||||||||
|
|
||||||||
| #### Claude Code | ||||||||
|
|
||||||||
| Add to your Claude Code MCP settings (`~/.claude/settings.json` or project-level). Note: Claude Code requires the `type: url` field (other clients do not). | ||||||||
|
|
||||||||
| ```json | ||||||||
| { | ||||||||
| "mcpServers": { | ||||||||
| "keploy": { | ||||||||
| "type": "url", | ||||||||
| "url": "https://your-keploy-host/client/v1/mcp", | ||||||||
| "headers": { | ||||||||
| "Authorization": "Bearer kep_YOUR_API_KEY" | ||||||||
| } | ||||||||
| } | ||||||||
|
Comment on lines
+106
to
+111
|
||||||||
| } | ||||||||
| } | ||||||||
| ``` | ||||||||
|
|
||||||||
|
||||||||
| **Security note:** When you replace `kep_YOUR_API_KEY` with a real key, keep this settings file out of version control (for example by using user-specific config locations or adding project-level config files to `.gitignore`), or use your editor/client’s secret storage or environment-variable substitution if available. Avoid committing real API keys to your repositories. |
Copilot
AI
Mar 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This URL is hardcoded to the Keploy Cloud domain. Since this page targets Keploy Enterprise (including self-hosted), the Cursor example should use a placeholder base URL and mention replacing it with the user’s Keploy API server host.
Copilot
AI
Mar 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This URL is hardcoded to the Keploy Cloud domain. Since this page targets Keploy Enterprise (including self-hosted), the Copilot example should use a placeholder base URL and mention replacing it with the user’s Keploy API server host.
Copilot
AI
Mar 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Antigravity example uses serverUrl while the other client examples use url, but unlike the Copilot section there’s no note explaining this schema difference. Add a short note clarifying that Antigravity expects serverUrl (if that’s intentional), or rename it to url for consistency.
Copilot
AI
Mar 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This URL is hardcoded to the Keploy Cloud domain. Since this page targets Keploy Enterprise (including self-hosted), the Antigravity example should use a placeholder base URL and mention replacing it with the user’s Keploy API server host.
Copilot
AI
Mar 31, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section mentions both Authorization: Bearer ... and X-API-Key: ... auth methods are supported, but the client config examples only show Authorization. Consider adding an X-API-Key variant (or a short note) so readers can copy/paste the alternative auth method more easily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The client config examples use slightly different MCP server schemas (Claude includes
type: "url", Cursor/Copilot omit it). Iftypeis required only for Claude, it would help to call that out explicitly; otherwise consider standardizing the examples so readers don’t copy the wrong shape between clients.