Overview
SourceCraft provides two different AI clients with separate MCP configuration formats:- SourceCraft Code Assistant for VS Code uses
mcpServersand Streamable HTTP. - SourceCraft CLI launches a bundled OpenCode agent with
src codeand uses OpenCode’smcpconfiguration.
Prerequisites
- A CodeAlive account and API key
- At least one indexed repository or workspace in CodeAlive
- SourceCraft Code Assistant for VS Code or SourceCraft CLI with OpenCode installed
SourceCraft Code Assistant for VS Code
1
Open the MCP configuration
In the Code Assistant chat panel, open MCP servers and enable Enable MCP Servers.Select Edit Global MCP to open the global
mcp_settings.json file.2
Add CodeAlive
Add the CodeAlive server under Replace
mcpServers:YOUR_API_KEY_HERE with your CodeAlive API key.3
Verify the connection
Save the file, return to the MCP servers panel, and restart the
codealive server. Expand the server entry to confirm that its tools were detected.SourceCraft CLI with OpenCode
SourceCraft CLI installs an isolated OpenCode binary, but retains OpenCode’s standard project configuration, plugins, rules, and tools. The setup below was verified with a project-levelopencode.json used by src code.
1
Set the API key environment variable
Make your CodeAlive API key available to OpenCode in the terminal where you will run SourceCraft CLI.
- macOS and Linux
- Windows PowerShell
2
Add the OpenCode configuration
Create or update OpenCode replaces
opencode.json at the repository root:{env:CODEALIVE_API_KEY} at runtime, so the API key does not need to be stored in the project file.3
Verify and launch
From the repository root, verify that OpenCode can connect to CodeAlive, then start the agent:
The two SourceCraft clients use different MCP schemas. Do not copy the VS Code
mcpServers configuration into opencode.json, or the OpenCode mcp configuration into mcp_settings.json.Try It
Ask SourceCraft Code Assistant or SourceCraft CLI:- “Show me all available repositories”
- “Find the authentication flow in the indexed repository”
- “Explain what calls this service and fetch the relevant implementations”
Troubleshooting
CodeAlive is missing from the SourceCraft Code Assistant server list
CodeAlive is missing from the SourceCraft Code Assistant server list
- Confirm that Enable MCP Servers is enabled
- Check that the configuration is inside the top-level
mcpServersobject - Validate the JSON syntax and restart the
codealiveserver - Confirm that you are using the VS Code extension; according to the SourceCraft documentation verified in Jul 2026, the JetBrains plugin does not expose external MCP configuration
SourceCraft CLI does not detect CodeAlive
SourceCraft CLI does not detect CodeAlive
- Run the commands from the directory containing
opencode.json - Confirm that the configuration uses
mcp, notmcpServers - Confirm that
typeis"remote" - Run
src code -- mcp listto inspect the connection status
Authentication fails
Authentication fails
- Confirm that the API key is active in the CodeAlive dashboard
- For VS Code, include the
Bearerprefix in theAuthorizationheader - For SourceCraft CLI, confirm that
CODEALIVE_API_KEYis set in the same terminal session used to runsrc code