-
-
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 4 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,124 @@ 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 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). | ||||||||
|
|
||||||||
| ### Setup for Claude Code | ||||||||
|
|
||||||||
| Add to your Claude Code MCP settings (`~/.claude/settings.json` or project-level): | ||||||||
|
|
||||||||
| ```json | ||||||||
| { | ||||||||
| "mcpServers": { | ||||||||
| "keploy": { | ||||||||
| "type": "url", | ||||||||
| "url": "https://your-keploy-host/client/v1/mcp", | ||||||||
| "headers": { | ||||||||
|
Comment on lines
+102
to
+108
|
||||||||
| "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.
tools/list may be read as an HTTP path. If this refers to the MCP method name, consider clarifying it’s the MCP "tools/list" request (not a REST endpoint on the Keploy server) to prevent confusion for readers trying to curl it.
| 1. The agent discovers available tools via `tools/list` | |
| 1. The agent discovers available tools via the MCP `tools/list` request (this is an MCP method, not an HTTP path on the Keploy server) |
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 internal link to the Public API docs uses /running-keploy/public-api, but other versioned docs in this repo use the /docs/... prefix for internal links (e.g., this same page links to /docs/keploy-cloud/cloud-installation/). This link is likely broken in the built site; please update it to the correct docs path (or a relative link) consistent with the rest of the docs.
| The MCP endpoint uses the same API key as the REST API and accepts the same two authentication methods: `Authorization: Bearer kep_...` or `X-API-Key: kep_...`. See the [Public API docs](/running-keploy/public-api) for details. All tools proxy to `/client/v1` endpoints using the caller's credentials. | |
| The MCP endpoint uses the same API key as the REST API and accepts the same two authentication methods: `Authorization: Bearer kep_...` or `X-API-Key: kep_...`. See the [Public API docs](/docs/running-keploy/public-api) for details. All tools proxy to `/client/v1` endpoints using the caller's credentials. |
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 positions MCP as a way to avoid agents parsing CLI output, but the rest of the page’s “Workflow” section still describes a CLI+JSON-output loop for agent iteration. To avoid confusing readers, consider explicitly stating that the CLI workflow is the fallback when MCP isn’t used (or add an MCP-based workflow variant / link to it).