docs: MCP server setup for Claude Code, Cursor, Copilot, Antigravity#814
docs: MCP server setup for Claude Code, Cursor, Copilot, Antigravity#814slayerjain merged 9 commits intomainfrom
Conversation
Adds comprehensive MCP section to the agent test generation docs: - Overview of 39+ auto-generated tools from OpenAPI spec - Setup instructions for Claude Code, Cursor, GitHub Copilot, Antigravity - Available tools table (including composite tools) - How the MCP workflow loop works (generate → run → coverage gaps → iterate) The MCP endpoint is at /client/v1/mcp on the Keploy API server. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: slayerjain <shubhamkjain@outlook.com>
Code Review SummaryStatus: No Issues Found | Recommendation: Merge OverviewThis incremental review covers changes since commit
The change clarifies how users can switch between
This directly addresses a previous review observation about both authentication methods being mentioned without clear guidance. All issues identified in previous reviews remain addressed:
Files Reviewed (1 file)
Reviewed by claude-4.5-opus-20251124 · 101,778 tokens |
There was a problem hiding this comment.
Pull request overview
Adds documentation for using Keploy’s MCP (Model Context Protocol) endpoint so AI coding agents can interact with the Agent Test Generation (ATG) platform via structured tools instead of parsing CLI output.
Changes:
- Documented the
/client/v1/mcpendpoint and an overview of available MCP tools (including composite tools likegenerate_and_wait). - Added MCP configuration examples for Claude Code, Cursor, GitHub Copilot, and Antigravity.
- Described a suggested MCP-driven workflow loop: generate → run → read coverage gaps → iterate.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ## MCP Server (Recommended for AI Agents) | ||
|
|
||
| Keploy provides an MCP (Model Context Protocol) endpoint that gives AI agents **native tool access** to the ATG platform. Instead of the agent parsing CLI output, it calls structured tools directly and gets typed JSON responses. |
There was a problem hiding this comment.
“ATG platform” is introduced without being defined elsewhere in this doc, which makes the section harder to follow for new readers. Consider expanding the acronym on first use (or replace with “agent test generation (ATG)” / “Keploy Agent Test Generation”).
| Keploy provides an MCP (Model Context Protocol) endpoint that gives AI agents **native tool access** to the ATG platform. Instead of the agent parsing CLI output, it calls structured tools directly and gets typed JSON responses. | |
| Keploy provides an MCP (Model Context Protocol) endpoint that gives AI agents **native tool access** to the agent test generation (ATG) platform. Instead of the agent parsing CLI output, it calls structured tools directly and gets typed JSON responses. |
| "type": "url", | ||
| "url": "https://api.keploy.io/client/v1/mcp", | ||
| "headers": { | ||
| "Authorization": "Bearer kep_YOUR_API_KEY" | ||
| } | ||
| } |
There was a problem hiding this comment.
This URL is hardcoded to the Keploy Cloud domain. Since this page targets Keploy Enterprise (including self-hosted), the example should use a placeholder base URL (e.g., https://<your-keploy-host>/client/v1/mcp) and mention that users must replace it with their own API server address.
| } | ||
| } | ||
| ``` | ||
|
|
There was a problem hiding this comment.
These examples include an API key in a config file. Please add an explicit warning not to commit credentials and guidance on keeping the file out of version control (or using environment-variable substitution / secret storage if supported by the client). Without that, users may paste real keys into repo-tracked files.
| **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. |
| "mcpServers": { | ||
| "keploy": { | ||
| "url": "https://api.keploy.io/client/v1/mcp", | ||
| "headers": { | ||
| "Authorization": "Bearer kep_YOUR_API_KEY" | ||
| } | ||
| } |
There was a problem hiding this comment.
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.
| GitHub Copilot supports MCP in agent mode. Configure in your `.github/copilot-mcp.json`: | ||
|
|
||
| ```json | ||
| { | ||
| "servers": { | ||
| "keploy": { | ||
| "url": "https://api.keploy.io/client/v1/mcp", | ||
| "headers": { | ||
| "Authorization": "Bearer kep_YOUR_API_KEY" | ||
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Putting MCP configuration under .github/ strongly implies it will be committed to the repo; combined with the Authorization header, this risks users accidentally committing real API keys. Consider recommending a user-level config location (if supported) or explicitly instructing to keep this file untracked/ignored and never store real secrets in-repo.
| "servers": { | ||
| "keploy": { | ||
| "url": "https://api.keploy.io/client/v1/mcp", | ||
| "headers": { | ||
| "Authorization": "Bearer kep_YOUR_API_KEY" | ||
| } | ||
| } |
There was a problem hiding this comment.
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.
| "mcpServers": { | ||
| "keploy": { | ||
| "serverUrl": "https://api.keploy.io/client/v1/mcp", | ||
| "headers": { | ||
| "Authorization": "Bearer kep_YOUR_API_KEY" | ||
| } | ||
| } |
There was a problem hiding this comment.
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.
1. Expand ATG acronym on first use 2-4,6-7. Replace hardcoded api.keploy.io with placeholder for self-hosted 5. Add security warning about not committing API keys Also: note Copilot config should be in .gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: slayerjain <shubhamkjain@outlook.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ### Setup for GitHub Copilot | ||
|
|
||
| GitHub Copilot supports MCP in agent mode. Configure in your Copilot settings (ensure this file is in `.gitignore` if it contains credentials): | ||
|
|
||
| ```json |
There was a problem hiding this comment.
The GitHub Copilot MCP setup section doesn’t specify the expected config file path/name (the PR description mentions .github/copilot-mcp.json), so readers won’t know where to put this JSON or what to add to .gitignore. Also, this example switches the top-level key from mcpServers (used above) to servers without explaining whether this is Copilot-specific; consider explicitly calling out the required filename/location and schema differences per client (or align the shape if they should be the same).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: slayerjain <shubhamkjain@outlook.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 7. This loop continues until coverage targets are met | ||
|
|
||
| The MCP endpoint uses the same API key as the REST API. All tools proxy to `/client/v1` endpoints using the caller's credentials. |
There was a problem hiding this comment.
The MCP section states it uses the same API key as the REST API, but the config examples only show Authorization: Bearer .... In running-keploy/public-api.md the REST API explicitly documents two supported auth headers (Authorization: Bearer and X-API-Key). Consider mentioning that MCP accepts the same two header options (or link to the Public API auth section) so users don’t assume Authorization is required.
- Note that GitHub Copilot uses 'servers' key (not 'mcpServers') - Document both auth methods: Authorization: Bearer and X-API-Key - Link to Public API docs for auth details Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@copilot review |
All previous review comments have been addressed across the prior commits (afab49a, 5b2efeb, 58f24b8):
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 6. The agent reads the coverage gaps and generates additional test suites for uncovered endpoints | ||
| 7. This loop continues until coverage targets are met | ||
|
|
||
| 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. |
There was a problem hiding this comment.
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. |
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "keploy": { | ||
| "type": "url", | ||
| "url": "https://your-keploy-host/client/v1/mcp", | ||
| "headers": { |
There was a problem hiding this comment.
The client config examples use slightly different MCP server schemas (Claude includes type: "url", Cursor/Copilot omit it). If type is 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.
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "keploy": { | ||
| "serverUrl": "https://your-keploy-host/client/v1/mcp", | ||
| "headers": { | ||
| "Authorization": "Bearer kep_YOUR_API_KEY" | ||
| } |
There was a problem hiding this comment.
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.
- Note Claude Code requires type: "url" (other clients do not) - Note Antigravity uses serverUrl (not url) - Fix Public API link to use /docs/ prefix for Docusaurus Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 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. | ||
|
|
There was a problem hiding this comment.
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).
| 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. | |
| 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. This MCP-based flow is the **recommended** integration for supported IDEs and agents. | |
| If your IDE or agent does not support MCP, you can fall back to the CLI + JSON-output workflow described in the **Workflow** section below; both approaches expose the same underlying capabilities. |
|
|
||
| ### How it Works | ||
|
|
||
| 1. The agent discovers available tools via `tools/list` |
There was a problem hiding this comment.
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) |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ### Setup for 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). | ||
|
|
There was a problem hiding this comment.
Inline code formatting has unnecessary escaped quotes (\"type\": \"url\"), which will render with backslashes in the docs. Use normal quotes inside the backticks (e.g., "type": "url" without backslashes).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ### Setup for 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 |
There was a problem hiding this comment.
This section introduces new headings like "Setup for Claude Code"/"Setup for Cursor" at the same heading level as the earlier "### Claude Code"/"### Cursor" sections above. In Docusaurus this can make the on-page TOC and anchor links ambiguous/confusing. Consider renaming these headings (e.g., "Claude Code (MCP)"), or lowering them one level (####) under the MCP section to clearly distinguish MCP setup from the earlier context-file setup.
…conflicts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 6. The agent reads the coverage gaps and generates additional test suites for uncovered endpoints | ||
| 7. This loop continues until coverage targets are met | ||
|
|
||
| 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.
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.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What has changed?
Adds MCP (Model Context Protocol) setup instructions to the agent test generation docs, covering all major AI coding platforms:
~/.claude/settings.jsonconfiguration.cursor/mcp.jsonconfiguration.github/copilot-mcp.jsonconfiguration (with explicit.gitignoreguidance and note onserversvsmcpServersschema difference)Also documents:
/client/v1/mcpendpointgenerate_and_wait,run_and_report,get_coverage_gaps)https://your-keploy-host) with instructions to substitute your actual Keploy instance (Cloud or self-hosted):::cautionsecurity admonition warning against committing API keys to version controlAuthorization: ****** andX-API-Key: kep_...`, with a link to the Public API docsType of change
How Has This Been Tested?
Verified the markdown renders correctly and all config examples use placeholder URLs and placeholder API key values.
Checklist: