This feature is only available in Visual Studio Code.
With SourceCraft MCP, you can manage SourceCraft entities though the Code Assistant chat interface, e.g., search for and complete issues, create pull requests, and more.
In this guide, we will use Code Assistant and SourceCraft MCP to find an issue in a repository, make the necessary changes, push them to the repository, and then close the issue.
The example uses the SourceCraft Code Assistant plugin to manage the MCP server, but you can select any other IDE plugin that supports MCP.
Set up your environment
For this tutorial, you will need the following tools:
Add to the created repository a file named hello.py with the following contents:
print("Hello, World")
Create an issue titled Add a version in Russian with the following description:
Add an alternative option in Russian to the hello.py file. The user will select the language when running the file.
Send your requests to the chat
In this example, we used the mcp-test public repository in the organization named orgname. Use your own names for requests to Code Assistant.
The results may vary depending on the model and selected behavior mode.
In VSCode, click the plugin icon in the left-hand panel.
In the chat that opens, ask Code Assistant to display a list of issues:
Show a list of issues in the mcp-test repository of the organization named orgname.
The assistant will use the ListRepositoryIssues tool to display the list of issues. Depending on your plugin settings, you may need to approve the request.
Clone the repository using Code Assistant:
Now clone the repository.
The assistant will get the clone link using the GetRepository tool and then run the git clone command.
Ask Code Assistant to complete the issue in a new repository branch:
Create a new repository branch and complete the previously mentioned issue of adding a version in Russian.
The assistant will edit the hello.py file and add a commit with the changes using git.
If Code Assistant did not test the edited code in the previous step, ask it to do so:
Test the code.
The assistant will test the updated code and display the test results.
Create a new pull request in the repository using the assistant:
Create a new pull request from the branch in the repository and link it to the previously mentioned issue.
The assistant will get the issue information in the repository using the GetRepository and GetIssue tools, push the changes to the remote repository via git, create a pull request using CreatePullRequest, and link it to the original issue via AddLinkedPRs.