---
title: "MCP"
description: "Connect Claude Code to Trevize's knowledge and actions through the Trevize MCP server."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.trevize.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP

Trevize ships a **Model Context Protocol (MCP)** server that connects Claude Code
— running in your own terminal or editor — to your Trevize workspace. With it,
your local agent can search your project's [knowledge](/concepts/knowledge), save
observations, and even kick off [implementations](/concepts/tasks).

## What it gives Claude Code

Once configured, these tools are available in your Claude Code session:

- `search(query)` — search your project's knowledge.
- `smart_search(query)` — semantic search across your code and knowledge.
- `write_observation(content)` — save an observation back to Trevize.
- `start_implementation(briefId)` — trigger an implementation.
- `migrate_claude_mem()` — import existing Claude memory.

## Set it up

1. **Create an API key**

   The MCP server authenticates with an **API key**. Create one in your account
   settings (**API keys**) and keep it handy.

2. **Point Trevize at your project**

   Make sure your repository has a Trevize settings file with your `workspaceId` and
   `projectId` (the `projectId` can be auto-detected from your git remote). See
   [Configuration](/configuration) for the full settings file.

3. **Add the server to .mcp.json**

   Add the Trevize server to your project's `.mcp.json`:

```json
{
  "mcpServers": {
"trevize": {
  "command": "npx",
  "args": ["-y", "trevize@latest", "mcp"],
  "env": {
    "TERVEZO_API_KEY": "your-api-key"
  }
}
  }
}
```

   Replace `your-api-key` with the key from the first step.

4. **Verify**

   Start a Claude Code session and run `search("test")`. If it returns, the server
   is connected.

> **Two directions**
>
> The MCP integration connects *your* local Claude Code to Trevize. Inside Trevize
> sessions and automations, agents already run against your connected repositories
> — MCP brings that same knowledge and those actions to your own machine.

Source: https://docs.trevize.dev/integrations/mcp/index.mdx
