112 lines
2.5 KiB
Markdown
Executable File
112 lines
2.5 KiB
Markdown
Executable File
# Quick Start
|
|
|
|
Deploy the MCP Drift State Tracker and integrate it with a coding client.
|
|
|
|
## Prerequisites
|
|
|
|
- **Node.js** >= 20.0.0 — [download](https://nodejs.org/) or use your package manager
|
|
- An MCP-compatible coding client
|
|
|
|
## 1. Install
|
|
|
|
```bash
|
|
git clone https://git.dcos.net/dcosnet/mcp-drift-state-tracker.git
|
|
cd mcp-drift-state-tracker
|
|
make
|
|
```
|
|
|
|
## 2. Verify with the MCP Inspector
|
|
|
|
Test the server in isolation before connecting a client. The Inspector provides
|
|
a sandboxed UI to invoke every tool (`scan_file`, `scan_workspace`,
|
|
`get_drift_report`, `reset_drift_state`) without a full orchestration stack.
|
|
|
|
```bash
|
|
make inspect
|
|
```
|
|
|
|
The Inspector opens at `http://localhost:6274`. Invoke tools, inspect responses,
|
|
and confirm the server parses your target language correctly.
|
|
|
|
## 3. Integration
|
|
|
|
### Claude Desktop / Claude Code
|
|
|
|
Add the following to `claude_desktop_config.json`:
|
|
|
|
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
- Linux: `~/.config/Claude/claude_desktop_config.json`
|
|
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
|
|
```json
|
|
{
|
|
"mcpServers": {
|
|
"mcp-drift-state-tracker": {
|
|
"command": "node",
|
|
"args": ["${MCP_TRACKER_PATH}/dist/index.js"]
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### VS Code (Continue.dev)
|
|
|
|
Add to VS Code `settings.json`:
|
|
|
|
```json
|
|
{
|
|
"mcp.servers": {
|
|
"mcp-drift-state-tracker": {
|
|
"command": "node",
|
|
"args": ["${MCP_TRACKER_PATH}/dist/index.js"]
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Development Mode
|
|
|
|
Skip the compile step and run directly from source:
|
|
|
|
```json
|
|
{
|
|
"mcpServers": {
|
|
"mcp-drift-state-tracker": {
|
|
"command": "npx",
|
|
"args": [
|
|
"--package", "tsx",
|
|
"tsx",
|
|
"${MCP_TRACKER_PATH}/src/index.ts"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
## 4. First Scan
|
|
|
|
Connect to the client and invoke a workspace scan:
|
|
|
|
```
|
|
scan_workspace /path/to/your/project
|
|
```
|
|
|
|
The server walks the directory tree, respects `globalIgnoreDirs` from
|
|
`language_profiles.json`, parses every recognized source file, and writes
|
|
results to `.mcp_drift_state.json` at the project root.
|
|
|
|
## 5. Read the Report
|
|
|
|
```
|
|
get_drift_report /path/to/your/project
|
|
```
|
|
|
|
The response contains a structured summary of every file's drift score, flagged
|
|
stubs, missing imports, and structural gaps.
|
|
|
|
## Next Steps
|
|
|
|
- Extend `language_profiles.json` with project-specific stub patterns or new languages
|
|
- Set service endpoints in `controller_config.json` to match your local deployment
|
|
- Integrate `scan_workspace` as a post-edit hook in CI pipelines
|
|
- See [BLOG.md](BLOG.md) for integration guides with Odysseus, Hermes, Open WebUI, Dify, and more |