> For clean Markdown of any page, append `.md` to the page URL.
> Documentation index: https://you.com/docs/llms.txt (section indexes: append `/llms.txt` to any section URL).
> Search these docs: Docs MCP at https://you.com/docs/_mcp/server (`searchDocs`, no API key).
> Call live You.com APIs: Product MCP at https://api.you.com/mcp (keyless `?profile=free` exposes `you-search` and `you-discover`. Research and finance use `/mcp/research`, `/mcp/finance`, or `?tools=` on `/mcp`). To pick an API or integration path, call `you-discover` on that server instead of guessing.
> OpenAPI: https://you.com/docs/openapi.json—auth header `X-API-Key`, env `YDC_API_KEY`.

# OpenCode

The [`@youdotcom-oss/opencode`](https://www.npmjs.com/package/@youdotcom-oss/opencode) plugin registers five You.com skills and configures the You.com MCP servers in one install. The MCP servers give OpenCode the tools. The skills tell it when to use each one and how to cite what it finds.

> **Install our docs MCP server**
>
> This documentation ships with a Docs MCP Server that gives any MCP-enabled agent a `searchDocs` tool to search every page here and get back relevant passages with source URLs—no API key required. Point your client at `https://you.com/docs/_mcp/server`. See the [Docs MCP Server guide](/docs/agents/docs-mcp-server) for setup and examples.

## Install the Plugin

## Install With OpenCode

```bash
opencode plugin @youdotcom-oss/opencode
```

Or add the plugin to your `opencode.json`:

```json
{ "plugin": ["@youdotcom-oss/opencode"] }
```

## Sign In

The `you`, `you-finance`, and `you-research` servers use OAuth through OpenCode's remote MCP support. OpenCode prompts you to sign in with your You.com account the first time the agent calls one of their tools. The `you-free` and `you-docs` servers need no auth.

## Try It

```text
Use you-web to find the latest Bun release and summarize the performance improvements.
```

### What the Plugin Configures

| MCP server     | Provides                    |
| -------------- | --------------------------- |
| `you`          | Authenticated You.com tools |
| `you-free`     | Keyless web search          |
| `you-finance`  | Finance tools               |
| `you-research` | The `you-research` tool     |
| `you-docs`     | You.com docs search         |

It also registers the `you-web`, `you-research`, `you-finance`, `you-discover`, and `you-free` skills.

## Use the MCP Server Without the Plugin

To add only the tools, without the skills, configure the MCP server directly.

## Add You.com to Your OpenCode Config

Edit `~/.config/opencode/opencode.json` (or your project-local `opencode.json`) and add:

```json
{
  "mcp": {
    "you-com": {
      "type": "remote",
      "url": "https://api.you.com/mcp?profile=free"
    }
  }
}
```

This uses the free profile: keyless `you-search` and `you-discover`, 100 queries per day, no signup.

## Restart OpenCode

```bash
opencode
```

The server loads on startup. You'll see `you-com` listed when you check connected MCP servers.

## Try It

```text
Search for the latest releases of Bun and summarize the performance improvements.
```

## Higher Rate Limits

For higher limits plus `you-contents` and `you-balance` on `/mcp`. `you-research` and `you-finance` need the dedicated paths or an explicit allowlist:

```json
{
  "mcp": {
    "you-com": {
      "type": "remote",
      "url": "https://api.you.com/mcp",
      "headers": {
        "Authorization": "Bearer <YDC_API_KEY>"
      }
    }
  }
}
```

Get a key at [you.com/platform](https://you.com/platform).

## Local Install (stdio)

If you'd prefer to run the MCP server locally:

```json
{
  "mcp": {
    "you-com": {
      "type": "local",
      "command": ["npx", "-y", "@youdotcom-oss/mcp"],
      "environment": {
        "YDC_API_KEY": "<YDC_API_KEY>"
      }
    }
  }
}
```

Omit `YDC_API_KEY` for free-tier behavior.

## Quick Demo

```text
Research the OpenCode project: who maintains it, what's the release cadence, and what's on the roadmap.
```

```text
Extract the README from https://github.com/sst/opencode and summarize the install methods.
```

## Troubleshooting

#### Server doesn't load

Check `opencode.json` is valid JSON. OpenCode silently skips invalid MCP entries.

#### spawn npx ENOENT

For local installs, install Node.js 18+ and ensure `npx` is on your `PATH`.

#### 401 errors

Verify the `Authorization` header is exactly `Bearer YDC-...` with one space.

#### Tool calls fail with no error

Check OpenCode's logs (`opencode --debug`) for MCP server errors. Most failures are config-format mismatches.

## Resources

#### [MCP Server Reference](/docs/agents/mcp-server)

Endpoint, authentication, and full tool reference.

#### [SDKs & Tools Overview](/docs/integrations-overview)

Browse every You.com SDK, agent tool, and integration.