
test mcp
一个用于运行批量更改的 MCP 服务器概念验证。
Repository Info
About This Server
一个用于运行批量更改的 MCP 服务器概念验证。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
src-cli MCP Server
This is a proof-of-concept (POC) for a MCP server that can be used to run batch changes via the src-cli tool.
It works with Claude Desktop as the MCP client.
This POC takes a local file path to a batch change spec file and uploads it to Sourcegraph via the src-cli tool.
Prerequisites
- Sourcegraph Access Token:
- Claude Desktop
- Node.js (>= v
22)
Steps
Clone this repo to your local machine
git clone git@github.com:sourcegraph/test-mcp.git
cd test-mcp/src
Install dependencies and spin up MCP server
pnpm run-build
Tell Claude Desktop about your server
In order for Claude Desktop to know about your MCP server, you need to add it to its configuration. Find your local claude_desktop_config.json file and add the
following, replacing necessary values with your own:
{
"mcpServers": {
// {... other MCP servers},
"execute-batch-change-spec": {
"command": "node",
"args": [
"/Users/audrey.lorberfeld/Desktop/src/test-mcp/build/batches.js" // Replace with your own path to this repo's /build/batches.js file
],
"env": {
"SRC_ENDPOINT": "https://sourcegraph.sourcegraph.com",
"SRC_ACCESS_TOKEN": "<your key here>", // Replace with your Sourcegraph Access Token
"PATH": "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin", // Replace with your `src-cli` path
"HOME": "/Users/audrey.lorberfeld" // Replace with your $HOME path
},
"permissions": {
"allow_local_tool_execution": true,
"allow_network_access": true,
"allow_env_access": true,
"allow_home_access": true,
"allow_system_binaries": true,
"allow_debugging": true
}
}
}
}
Start Claude Desktop
Note: You need to restart Claude Desktop if you already have it open, once you (re)launch this MCP server, or it will not pick up the latest changes.
You should see the MCP server in the 'Available MCP Tools' section of Claude Desktop (accessible by clicking on the hammer icon in the chat interface).
Run a batch change!
Note: Expect this step to take a minute or two.
You can now run a batch change by typing in the chat interface something like "Please generate a batch change for this spec file: <path-to-your-spec-file.yaml>"
A sample spec can be found in this repo under audrey-was-here.yaml.
Claude Desktop should prompt you for permission to access your file system. Once you grant it, Claude Desktop should use the MCP server to run the batch change and push it up to Sourcegraph (s2).

Quick Start
Clone the repository
git clone https://github.com/sourcegraph/test-mcpInstall dependencies
cd test-mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.