Skip to content

docs: MCP server setup for Claude Code, Cursor, Copilot, Antigravity#814

Merged
slayerjain merged 9 commits intomainfrom
feat/mcp-agent-setup-docs
Apr 1, 2026
Merged

docs: MCP server setup for Claude Code, Cursor, Copilot, Antigravity#814
slayerjain merged 9 commits intomainfrom
feat/mcp-agent-setup-docs

Conversation

@nehagup
Copy link
Copy Markdown
Member

@nehagup nehagup commented Mar 31, 2026

What has changed?

Adds MCP (Model Context Protocol) setup instructions to the agent test generation docs, covering all major AI coding platforms:

  • Claude Code: ~/.claude/settings.json configuration
  • Cursor: .cursor/mcp.json configuration
  • GitHub Copilot: .github/copilot-mcp.json configuration (with explicit .gitignore guidance and note on servers vs mcpServers schema difference)
  • Antigravity: MCP settings configuration

Also documents:

  • 39+ auto-generated tools available via the /client/v1/mcp endpoint
  • High-level composite tools (generate_and_wait, run_and_report, get_coverage_gaps)
  • The MCP workflow loop: generate → run → read coverage gaps → iterate
  • Placeholder base URL (https://your-keploy-host) with instructions to substitute your actual Keploy instance (Cloud or self-hosted)
  • :::caution security admonition warning against committing API keys to version control
  • Both supported auth methods: Authorization: ****** and X-API-Key: kep_...`, with a link to the Public API docs
  • "Automated Test Generation (ATG)" acronym expanded on first use

Type of change

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Documentation update (if none of the other choices apply).

How Has This Been Tested?

Verified the markdown renders correctly and all config examples use placeholder URLs and placeholder API key values.

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.

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>
Copilot AI review requested due to automatic review settings March 31, 2026 19:21
@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot bot commented Mar 31, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This incremental review covers changes since commit 217e7673acaeab7d3fd746cf3a5e2293f0b7203d. The only change is an improvement to the authentication documentation:

Change Assessment
Line 187: Expanded authentication guidance ✅ Improves clarity

The change clarifies how users can switch between Authorization: Bearer and X-API-Key authentication methods by:

  1. Noting which method the examples use (Authorization: Bearer)
  2. Explaining how to use the alternative (X-API-Key)
  3. Providing the exact JSON key format to use in configs

This directly addresses a previous review observation about both authentication methods being mentioned without clear guidance.

All issues identified in previous reviews remain addressed:

  • ATG acronym is defined as "Automated Test Generation (ATG) platform"
  • URLs use placeholder https://your-keploy-host with instructions
  • API key security caution box is present
  • GitHub Copilot config location specifies .github/copilot-mcp.json with .gitignore guidance
  • Claude Code type: url field documented with clean formatting
  • Antigravity serverUrl field name difference documented
  • Internal link path corrected to /docs/running-keploy/public-api/
Files Reviewed (1 file)
  • versioned_docs/version-4.0.0/running-keploy/agent-test-generation.md - Authentication documentation improvement only

Reviewed by claude-4.5-opus-20251124 · 101,778 tokens

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/mcp endpoint and an overview of available MCP tools (including composite tools like generate_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.
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“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”).

Suggested change
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.

Copilot uses AI. Check for mistakes.
Comment on lines +98 to +103
"type": "url",
"url": "https://api.keploy.io/client/v1/mcp",
"headers": {
"Authorization": "Bearer kep_YOUR_API_KEY"
}
}
Copy link

Copilot AI Mar 31, 2026

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 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.

Copilot uses AI. Check for mistakes.
}
}
```

Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
**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 uses AI. Check for mistakes.
Comment on lines +120 to +126
"mcpServers": {
"keploy": {
"url": "https://api.keploy.io/client/v1/mcp",
"headers": {
"Authorization": "Bearer kep_YOUR_API_KEY"
}
}
Copy link

Copilot AI Mar 31, 2026

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 uses AI. Check for mistakes.
Comment on lines +135 to +147
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"
}
}
}
}
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +139 to +145
"servers": {
"keploy": {
"url": "https://api.keploy.io/client/v1/mcp",
"headers": {
"Authorization": "Bearer kep_YOUR_API_KEY"
}
}
Copy link

Copilot AI Mar 31, 2026

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 uses AI. Check for mistakes.
Comment on lines +156 to +162
"mcpServers": {
"keploy": {
"serverUrl": "https://api.keploy.io/client/v1/mcp",
"headers": {
"Authorization": "Bearer kep_YOUR_API_KEY"
}
}
Copy link

Copilot AI Mar 31, 2026

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 uses AI. Check for mistakes.
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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +139 to +143
### 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
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: slayerjain <shubhamkjain@outlook.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +181 to +183
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.
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
- 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>
@nehagup
Copy link
Copy Markdown
Member Author

nehagup commented Mar 31, 2026

@copilot review

Copy link
Copy Markdown

Copilot AI commented Mar 31, 2026

@copilot review

All previous review comments have been addressed across the prior commits (afab49a, 5b2efeb, 58f24b8):

  • Acronym "ATG" expanded to "Automated Test Generation (ATG)" on first use
  • All hardcoded api.keploy.io URLs replaced with https://your-keploy-host placeholder, with a note to substitute your actual host
  • :::caution API Key Security admonition added before all config examples, warning against committing keys to version control
  • GitHub Copilot section now explicitly names the config file (.github/copilot-mcp.json), instructs adding it to .gitignore, and explains the servers (not mcpServers) schema difference
  • Auth section now documents both supported methods: Authorization: ****** and X-API-Key: kep_...`, with a link to the Public API docs

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link

Copilot AI Mar 31, 2026

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
Comment on lines +100 to +106
```json
{
"mcpServers": {
"keploy": {
"type": "url",
"url": "https://your-keploy-host/client/v1/mcp",
"headers": {
Copy link

Copilot AI Mar 31, 2026

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). 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.

Copilot uses AI. Check for mistakes.
Comment on lines +162 to +169
```json
{
"mcpServers": {
"keploy": {
"serverUrl": "https://your-keploy-host/client/v1/mcp",
"headers": {
"Authorization": "Bearer kep_YOUR_API_KEY"
}
Copy link

Copilot AI Mar 31, 2026

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 uses AI. Check for mistakes.
- 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>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +71 to +72
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.

Copy link

Copilot AI Mar 31, 2026

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).

Suggested change
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.

Copilot uses AI. Check for mistakes.

### How it Works

1. The agent discovers available tools via `tools/list`
Copy link

Copilot AI Mar 31, 2026

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.

Suggested change
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 uses AI. Check for mistakes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +96 to +99
### 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).

Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +96 to +100
### 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
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
…conflicts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link

Copilot AI Mar 31, 2026

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.

Copilot uses AI. Check for mistakes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@slayerjain slayerjain merged commit 96d180a into main Apr 1, 2026
11 of 12 checks passed
@slayerjain slayerjain deleted the feat/mcp-agent-setup-docs branch April 1, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants