---
title: "OpenCode"
description: "Add Klint to OpenCode through opencode.json."
---

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

# OpenCode

Open-source terminal agent that works with many models. MCP servers live in
`opencode.json`.

1. **Add the server**

   In `opencode.json` in your project, or `~/.config/opencode/opencode.json`
   for every project:

   ```json
   {
     "$schema": "https://opencode.ai/config.json",
     "mcp": {
       "klint": {
         "type": "remote",
         "url": "https://mcp.tryklint.ai/mcp",
         "enabled": true
       }
     }
   }
   ```
2. **Sign in to Klint**

   ```bash
   opencode mcp auth klint
   ```

   This opens your browser to sign in.
3. **Ask it something**

   ```text
   Ask Klint who is shaping the AI agent debate on TikTok right now.
   ```

   The first answer takes a few minutes, because Klint is reading real posts.

## If it doesn't work

- **No Klint tools appear.** Restart the agent, or start a new session, after
  saving its settings.
- **The agent answers without Klint.** Name Klint in your question and ask the
  agent which tool it called.
- **No answer yet.** A run often takes 3 to 10 minutes. Let the agent keep
  checking.

More fixes, the tools and how a run works are on
[Any MCP client](https://tryklint.ai/docs/agent-setup/any-mcp-client/).

Source: https://tryklint.ai/docs/agent-setup/opencode/index.mdx
