MCP Server
Register the MCP Server
The CppDepend MCP Server is a stdio server: the coding agent launches it and talks to it over standard input/output. Register it once in Claude Code, Codex, GitHub Copilot or Junie, or serve it over Streamable HTTP.
What every agent needs
Every agent below needs the same two things: a server name and the command that starts the server.
Server name: use a name without dots, such as cppdepend. Codex reads the name as a TOML key (a dot would split it), and the other agents derive their tool ids from it.
Command: the server ships in the net10.0 directory of the CppDepend redistributable, written <cppdepend-install> below.
| OS | Command |
|---|---|
| Windows | <cppdepend-install>\net10.0\CppDepend.Mcp.StdioServer.exe |
| Linux / macOS | dotnet <cppdepend-install>/net10.0/CppDepend.Mcp.StdioServer.dll |
No .exe is provided on Linux and macOS, so the server is launched through the dotnet host there.
Optional arguments, appended after the command:
--load-cdproj-or-slnx <path>loads a CppDepend project (.cdproj) or a solution (.slnx/.sln) at startup. Without it, the agent callscppdepend-initialize-from-solutionfirst.--log-directory <dir>sets where the logs go (see Logs). Without it, logs go to alogsdirectory next to the server. When the directory cannot be created, the server falls back to the temp directory.
Loading a project and running an analysis can take minutes on a large code base: raise the agent's MCP startup and tool-call timeouts where it has them (see Codex below).
Claude Code
From the command line (--scope user for every project, --scope project to share it through a .mcp.json at the repository root):
claude mcp add cppdepend --scope user -- "<cppdepend-install>\net10.0\CppDepend.Mcp.StdioServer.exe"
claude mcp add cppdepend --scope user -- dotnet "<cppdepend-install>/net10.0/CppDepend.Mcp.StdioServer.dll"
or in the repository's .mcp.json:
{
"mcpServers": {
"cppdepend": {
"command": "dotnet",
"args": ["<cppdepend-install>/net10.0/CppDepend.Mcp.StdioServer.dll"]
}
}
}
Check it with claude mcp list, or /mcp inside a session.
Codex
From the command line:
codex mcp add cppdepend -- dotnet "<cppdepend-install>/net10.0/CppDepend.Mcp.StdioServer.dll"
or in ~/.codex/config.toml. The timeouts matter here: Codex's defaults are shorter than a project load or an analysis.
[mcp_servers.cppdepend]
command = "dotnet"
args = ["<cppdepend-install>/net10.0/CppDepend.Mcp.StdioServer.dll"]
startup_timeout_sec = 300
tool_timeout_sec = 300
On Windows, command is the .exe path and args is empty (or holds the optional arguments). In TOML, write Windows paths with forward slashes or doubled backslashes.
GitHub Copilot
Visual Studio 2026 and VS Code
Both IDEs can register the server from their menus. This adds to the MCP JSON configuration file:
{
"inputs": [],
"servers": {
"cppdepend": {
"type": "stdio",
"command": "<cppdepend-install>\\net10.0\\CppDepend.Mcp.StdioServer.exe",
"env": {}
}
}
}
On Linux and macOS, use "command": "dotnet" and "args": ["<path to CppDepend.Mcp.StdioServer.dll>"].
The configuration file can live here:
C:\Users\%usr%\AppData\Roaming\Code\User\mcp.json - Global configuration for all solutions
[SOLUTIONDIR]\.vs\mcp.json - Visual Studio only, solution-specific, user-specific
[SOLUTIONDIR]\.mcp.json - Solution-level, can be tracked in source control
[SOLUTIONDIR]\.vscode\mcp.json - Supports both VS Code and Visual Studio
If the same MCP server is listed in both a global and a solution-specific configuration file, Copilot treats them as separate servers, which can cause conflicts.
Copilot CLI
From the command line:
copilot mcp add cppdepend -- dotnet "<cppdepend-install>/net10.0/CppDepend.Mcp.StdioServer.dll"
This writes the user configuration ~/.copilot/mcp-config.json. A workspace can also declare it in .mcp.json or .github/mcp.json:
{
"mcpServers": {
"cppdepend": {
"type": "local",
"command": "dotnet",
"args": ["<cppdepend-install>/net10.0/CppDepend.Mcp.StdioServer.dll"],
"tools": ["*"]
}
}
}
Check it with copilot mcp list.
Junie
Junie reads mcp.json from ~/.junie/mcp/ (every project) and from .junie/mcp/ in the project (this project only):
{
"mcpServers": {
"cppdepend": {
"command": "dotnet",
"args": ["<cppdepend-install>/net10.0/CppDepend.Mcp.StdioServer.dll"]
}
}
}
The Junie CLI can also read additional folders with --mcp-location=<folder>.
Streamable HTTP
CppDepend.Mcp.HttpServer serves the same tools over Streamable HTTP, at http://localhost:3001/mcp by default (--port <n> to change it). Start it yourself, then register the URL:
claude mcp add --transport http cppdepend http://localhost:3001/mcp
codex mcp add cppdepend --url http://localhost:3001/mcp
copilot mcp add --transport http cppdepend http://localhost:3001/mcp
or, in a Visual Studio / VS Code MCP JSON file:
{
"inputs": [],
"servers": {
"cppdepend": {
"type": "http",
"url": "http://localhost:3001/mcp"
}
}
}
Logs
If an error occurs while using a CppDepend MCP tool, check the log files in the logs directory next to the server, or in the directory passed with --log-directory.
