MCP Server

View as MarkdownOpen in Claude

Introduction

The You.com MCP Server gives your LLMs and agents access to live web search, page extraction, citation-backed research, and finance research through the Model Context Protocol. The server is hosted at api.you.com, with additional paths for other tools.

Connect to that host over HTTP, or run npx @youdotcom-oss/mcp over STDIO. Tool selection rules are in Scope Tools.

A separate MCP server that allows agents to search over these docs is available: Docs MCP Server guide.

Getting Started

1

Choose your setup

You can discover this server in the Anthropic MCP Registry as io.github.youdotcom-oss/mcp, or configure it manually:

Remote server (recommended)

Hosted at https://api.you.com/mcp. Add that URL to your agent’s configuration.

Local NPM package

For self-hosting or offline development. Install via npx @youdotcom-oss/mcp to run locally with STDIO transport.

2

Configure your client

Choose from Windsurf, Claude Code, Cursor, VS Code, JetBrains, or other supported editors. See the Setup guides below for IDE-specific configuration.

Standard Configuration Templates

Remote server requires an API key or OAuth 2.1. If the client supports OAuth 2.1, connect without credentials and the authorization flow starts. Otherwise, pass an API key. This URL is bare /mcp:

{
"mcpServers": {
"ydc-server": {
"type": "http",
"url": "https://api.you.com/mcp",
"headers": {
"Authorization": "Bearer <YDC_API_KEY>"
}
}
}
}

Get an API key at you.com/platform.

3

Test your setup

The base remote template exposes four capabilities: general web search, web page content extraction, account balance, and tool discovery. Try:

  • “Search the web for this week’s grid-scale battery news, then extract and summarize the top three pages”
  • “Extract the content from https://example.com”
  • “Use you-discover to pick a You.com API for a TypeScript agent”
  • “Find this week’s articles on AI regulation and summarize the filings they cite.”

The client may ask for permission the first time it calls a tool.

Authentication

  • Free—Some tools are free to use, with rate limits. Read more: Scope Tools.
  • Payment authorization—x402 headers (PAYMENT-SIGNATURE or X-PAYMENT) and Machine Payments Protocol (Authorization: Payment) bypass local auth for you-search, you-contents, you-research, you-finance, and you-discover. The server forwards those headers to the upstream API. you-balance still requires an API key. See Machine Payments.
  • Bearer token— Pass this header in your MCP client’s configuration file: Authorization: Bearer <YDC_API_KEY>. Get a key at you.com/platform.
  • OAuth 2.1—an MCP client that implements MCP Authorization can connect without a pasted key.

Local NPM package (npx @youdotcom-oss/mcp) uses YDC_API_KEY or YDC_PROFILE.

OAuth is only available on the HTTP server. The local NPM package does not support OAuth.

Endpoints

EndpointWhat it does
api.you.com/mcpGeneral endpoint. All tools are available based on configuration.
api.you.com/mcp/financeExclusively for you-finance. No tool scoping. No free usage.
api.you.com/mcp/researchExclusively for you-research. No tool scoping. No free usage.

The server exposes six tools: you-search, you-contents, you-research, you-finance, you-balance, and you-discover. There is no you-answer tool.

Create Multiple MCP Server Entries

In your MCP client’s configuration file, you can create several entries, each with their own authentication and tool scoping configuration.

This is useful when you want maximum control over the tools that are available to an agent, and how the agent uses them. For example, you may hook into an agent’s tool call event specifically for you-research, and then instruct it to double-check the research_effort it wants to use. A simpler benefit is better cost management: dedicated API keys for high impact tools like you-research and you-finance.

{
"mcpServers": {
"you.com_free": {
"url": "https://api.you.com/mcp?profile=free"
},
"you.com_search_basic": {
"url": "https://api.you.com/mcp?tools=you-search,you-contents",
"headers": {
"Authorization": "Bearer <YDC_API_KEY>"
}
},
"you.com_research": {
"url": "https://api.you.com/mcp/research",
"headers": {
"Authorization": "Bearer <YDC_API_KEY>"
}
},
"you.com_finance_research": {
"url": "https://api.you.com/mcp/finance",
"headers": {
"Authorization": "Bearer <YDC_API_KEY>"
}
}
}
}

Scope Tools

A tool is listed only when the profile ceiling and the allowlist both include it. The server computes that intersection on every request. For the allowlist, the first non-empty value wins: the X-Allowed-Tools header, then ?tools=, then the default.

profile
stringDefaults to all six tools

HTTP query parameter ?profile=. free allows you-search and you-discover, with no API key and 100 queries per day. discover allows you-discover, with no API key. An omitted or unknown value allows all six tools. The local package reads YDC_PROFILE with the same values.

tools
stringDefaults to you-search,you-contents,you-balance,you-discover

HTTP query parameter ?tools=, a comma-separated allowlist. The default omits you-research and you-finance. A non-empty X-Allowed-Tools header replaces this value.

X-Allowed-Tools
string

HTTP header, comma-separated. A non-empty value replaces ?tools= and the default. An empty or omitted header leaves the query parameter or the default in place. The local package does not read this header.

YDC_ALLOWED_TOOLS
string

Allowlist for npx @youdotcom-oss/mcp. Same role as X-Allowed-Tools on HTTP.

/mcp/finance and /mcp/research replace the allowlist with that one tool. ?tools= and X-Allowed-Tools on those paths are ignored. The profile ceiling still applies.

POST /mcp/finance?profile=free asks for you-finance under the free ceiling, which only includes you-search and you-discover. The client sees no tools, and the server returns no error. free or discover on /mcp/research does the same.

The same allowlist, you-search,you-finance, on each transport:

{
"mcpServers": {
"ydc-server": {
"type": "http",
"url": "https://api.you.com/mcp?tools=you-search,you-finance",
"headers": {
"Authorization": "Bearer <YDC_API_KEY>"
}
}
}
}

you-search,you-contents leaves you-research off the list, so the agent runs its own search-read-synthesize loop. The you-research agent skill pins that allowlist.

Search Parameter Control

you-search accepts parameters at two levels: the common search parameters the model sets naturally, and a deeper integration lane that gives your host application full parameter control.

Model-facing parameters (common)

These are part of the tool’s input schema, so your agent sets them conversationally—no special handling needed:

  • query, count, freshness, offset—the core search shape
  • extraction, extraction_source, crawl_timeout—page-content retrieval tuning
  • knowledge, safesearch—result enrichment and moderation
  • exclude_domains—domain exclusion

Inline search operators in the query (site:, lang:, loc:, filetype:) map to the same underlying parameters automatically.

Host-supplied overrides (deep integration)

For full parameter control, your host application can supply overrides out-of-band on each tools/call under the reserved _meta key com.you.com/search (or equivalently as X-Search-* HTTP headers). These overrides don’t have to be model-generated, and they always win over model-supplied arguments:

{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "you-search",
"arguments": { "query": "EV tax incentives" },
"_meta": {
"com.you.com/search": {
"country": "US",
"language": "EN",
"count": 20,
"include_domains": ["irs.gov", "energy.gov"],
"safesearch": "strict"
}
}
}
}

Every override field is optional. The supported set:

  • Hybrid—also settable by the model: count, extraction, extraction_source, knowledge, exclude_domains, safesearch, crawl_timeout
  • Host-only—settable here only, never exposed to the model: language, country, include_domains, boost_domains

The override contract is broadcast on the tool entry itself. A tools/list response returns the accepted fields and their constraints in tool._meta["com.you.com/search"]:

{
"name": "you-search",
"_meta": {
"com.you.com/search": {
"description": "Host-supplied search overrides. Send an object under the com.you.com/search key in tools/call params._meta (or X-Search-* HTTP headers); every field is optional and wins over model-supplied arguments. Host-only fields (language, country, include_domains, boost_domains) are settable here and never by the model.",
"schema": {
"type": "object",
"properties": {
"count": { "type": "integer", "minimum": 1, "maximum": 100 },
"country": { "type": "string", "enum": ["AR", "AU", "AT", "...", "US"] },
"safesearch": { "type": "string", "enum": ["off", "moderate", "strict"] }
}
}
}
}
}

Because tools/list results are cacheable, you can fetch the contract once and reuse it to validate overrides at runtime.

Every override field has an HTTP header equivalent, sent alongside your other request headers:

_meta fieldHeader
countX-Search-Count
extractionX-Search-Extraction
extraction_sourceX-Search-Extraction-Source
knowledgeX-Search-Knowledge
exclude_domainsX-Search-Exclude-Domains (comma-separated)
safesearchX-Search-Safesearch
crawl_timeoutX-Search-Crawl-Timeout
languageX-Search-Language
countryX-Search-Country
include_domainsX-Search-Include-Domains (comma-separated)
boost_domainsX-Search-Boost-Domains (comma-separated)

Merge and validation behavior

  • Precedence—field-level merge: X-Search-* headers beat _meta, which beats model-supplied arguments
  • Unknown keys and headers are ignored—an invalid value on a recognized field surfaces a named tool error rather than a silent fallback
  • Domain guards—include_domains cannot be combined with exclude_domains or boost_domains. Domain lists are capped at 500 (error, not truncation)
  • Inline operators—site:, lang:, and loc: operators stay raw in the query when the corresponding explicit override is present

Setup Guides

Windsurf

For setup, follow the MCP installation guide.

Quick setup (API key):

claude mcp add --transport http ydc-server https://api.you.com/mcp --header "Authorization: Bearer <YDC_API_KEY>"

OAuth 2.1 (no API key): Connect without credentials and Claude Code will initiate the OAuth flow automatically:

claude mcp add --transport http ydc-server https://api.you.com/mcp

For setup, follow the MCP installation guide.

Local config lives in claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Paste the local NPM package template from Getting Started, then restart Claude Desktop. For setup, follow the MCP installation guide.

Install MCP Server

Config file: ~/.cursor/mcp.json. For setup, follow the MCP installation guide. Omit the type field. To run free, discover, a mixed allowlist, research, and finance as separate entries, paste the multiple You.com entries block. Keyed entries need Authorization: Bearer <YDC_API_KEY> or OAuth. ?profile=free and ?profile=discover stay keyless.

To avoid conflicts, go to Settings → Agents tab and turn off Cursor’s built-in web search tool.

Quick setup (command line):

code --add-mcp '{"name":"ydc-server","url":"https://api.you.com/mcp","type":"http","headers":{"Authorization":"Bearer <YDC_API_KEY>"}}'

For setup, follow the MCP installation guide. Use the configuration template above.

Requirements: GitHub Copilot extension must be installed

For setup, follow the MCP installation guide. Use the configuration template above.

Supported IDEs: IntelliJ IDEA, PyCharm, WebStorm, GoLand, RubyMine, PhpStorm, and more (requires AI Assistant enabled)

For setup, follow the MCP installation guide. Use the configuration template above without the type field.

Quick setup (OAuth, no API key):

droid mcp add you https://api.you.com/mcp --type http

Droid initiates the OAuth 2.1 flow automatically. Run /mcp inside a Droid session to complete the browser sign-in.

API key with env injection (recommended for secrets):

droid mcp add you https://api.you.com/mcp --type http \
--header 'Authorization: Bearer ${YDC_API_KEY}' --no-oauth

Droid expands ${YDC_API_KEY} at connection time, so the key stays out of the config file. Add --no-oauth to prevent Droid from attempting OAuth alongside the header.

Hardcoded API key:

droid mcp add you https://api.you.com/mcp --type http \
--header 'Authorization: Bearer <YDC_API_KEY>' --no-oauth

Free profile (no account):

droid mcp add you https://api.you.com/mcp?profile=free --type http --no-oauth

Verify: droid mcp list or /mcp inside a Droid session.

For setup, follow the Factory MCP guide.

Codex:

For setup, follow the MCP installation guide.

opencode:

For setup, follow the MCP installation guide. Use the remote server template in Getting Started.

LM Studio:

For setup, follow the MCP installation guide. Use the remote server template in Getting Started, without the type field.

Gemini CLI:

Follow the MCP server setup guide using the standard configuration template.

Troubleshooting

Symptoms: Authentication errors, “Invalid API key” messages

Solutions:

  1. Verify your API key is active at you.com/platform
  2. Check for extra spaces or quotes in your configuration
  3. Ensure the API key has the correct scopes enabled
  4. For the local NPM package, verify the YDC_API_KEY environment variable is properly exported
  5. On the remote server, try OAuth 2.1, described in Authentication

Symptoms: Browser window doesn’t open, OAuth flow fails, “Invalid token” errors

Solutions:

  1. Confirm your MCP client supports OAuth 2.1—check your client’s documentation
  2. If the browser window opens but authorization fails, try signing in to you.com first in the same browser
  3. If the flow completes but the client still receives 401, restart the MCP client to clear cached token state
  4. As a fallback, use an API key from you.com/platform instead

Symptoms: “Connection refused”, timeout errors

Solutions:

  1. Remote server: Check your internet connection and firewall settings
  2. Local package: Ensure npx and Node.js are installed and in your PATH
  3. Confirm the URL is https://api.you.com/mcp, /mcp/research, or /mcp/finance
  4. Check your MCP client logs for detailed error messages

Symptoms: MCP server not appearing in IDE, tools not available

Solutions:

  1. Restart your IDE after configuration changes
  2. Check the IDE’s MCP logs for error messages (Claude Code: terminal output, Claude Desktop: application menu, Cursor: MCP server logs in settings, VS Code: output panel)
  3. Verify the configuration file is in the correct location
  4. For STDIO transport, ensure the command is executable
  5. Try the remote server option if local installation fails

Symptoms: The server connects but tools/list is empty

Cause: The profile ceiling ∩ allowed-tools intersection is empty. Common cases: POST /mcp/finance?profile=free, POST /mcp/research?profile=discover, or an allowlist that names only tools the profile forbids.

Solutions:

  1. Drop ?profile= (or use a profile whose ceiling includes the tool)
  2. On /mcp/finance and /mcp/research, the path already forces the allowlist. A free or discover profile on that URL empties the list
  3. Check X-Allowed-Tools and ?tools= for a non-empty header that replaced the query string

Report an Issue

MCP client logs include a pre-filled mailto link with the error details.

Resources