﻿# Continue MCP working directory determines relative resource paths

A local Continue MCP server resolves relative resource paths from its process working directory; check cwd and arguments before treating a connected server as the intended database.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-continue-mcp-working-directory/
Language: en

## Investigate the wrong database behind a working tool

An MCP tool appears in Continue and returns a valid schema, but the tables belong to a sample database. Connectivity is working; resource selection is wrong. The [YAML reference](https://docs.continue.dev/reference) gives local MCP servers a command, arguments and an optional `cwd`. Its example combines a relative database path with an explicit working directory. That directory matters independently of whichever source file is currently open in the editor.

## Resolve the process inputs together

Read the command, argument list and working directory as a single launch description. A relative filename such as `./test.db` needs a base directory. Do not assume it follows the active editor tab or the location of a copied YAML fragment. For a reproducible configuration, choose an intentional process directory or a suitably resolved resource path. Then confirm the opened database using harmless identifying information rather than modifying data to discover where the writes landed.

## Locate the configuration that launches the process

The [MCP deep dive](https://docs.continue.dev/customize/deep-dives/mcp) describes workspace server blocks under `.continue/mcpServers` and the metadata required for standalone YAML blocks. A server definition elsewhere may not be the active one. Inspect the resolved configuration and actual launch error when present. Avoid creating duplicate server definitions as a workaround: similar display names can make it harder to identify which process supplied the tool result.

## Separate discovery from data authorization

The [MCP overview](https://docs.continue.dev/customize/mcp-tools) describes external tool and database connections. Tool discovery confirms exposed operations, not that the selected resource is appropriate for the task. The working directory selects relative paths but is not itself a restriction on every path the server can access. The server's process permissions and own validation still govern its operations. State which repository or database the task is supposed to inspect.

## Preserve a resource-specific observation

Record the effective configuration and a non-sensitive identifier demonstrating the intended resource. [Tool observations](/journal/learn-codex-tool-observation/) distinguish process startup, discovered schema and returned data; a [task contract](/journal/learn-codex-task-contract/) defines the authorized target. Recheck the resolution when moving a configuration between machines or launch wrappers. A healthy connection to the wrong file can be more misleading than an obvious startup failure.
