Skip to main content

Overview

SourceCraft provides two different AI clients with separate MCP configuration formats:
  • SourceCraft Code Assistant for VS Code uses mcpServers and Streamable HTTP.
  • SourceCraft CLI launches a bundled OpenCode agent with src code and uses OpenCode’s mcp configuration.
Follow the section for the client you use. Configuring one does not configure the other.

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

According to the current SourceCraft documentation (verified Jul 2026), external MCP server configuration is supported only in the Visual Studio Code extension. The JetBrains plugin is available, but does not currently expose external MCP configuration.
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 mcpServers:
Replace 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 also supports a project-level .codeassistant/mcp.json file. Do not commit an API key to version control; prefer the global configuration when using a literal key.

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-level opencode.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.
2

Add the OpenCode configuration

Create or update opencode.json at the repository root:
OpenCode replaces {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

  1. Confirm that Enable MCP Servers is enabled
  2. Check that the configuration is inside the top-level mcpServers object
  3. Validate the JSON syntax and restart the codealive server
  4. 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
  1. Run the commands from the directory containing opencode.json
  2. Confirm that the configuration uses mcp, not mcpServers
  3. Confirm that type is "remote"
  4. Run src code -- mcp list to inspect the connection status
  1. Confirm that the API key is active in the CodeAlive dashboard
  2. For VS Code, include the Bearer prefix in the Authorization header
  3. For SourceCraft CLI, confirm that CODEALIVE_API_KEY is set in the same terminal session used to run src code