ydc-agent
Can be deployed as a serverless Cloudflare Worker, using a D1 database binding for conversation history, with a /setup page to initialize the database, multi-key support, and custom agent configuration via environment variables.
Exposes an OpenAI-compatible HTTP server with /v1/chat/completions and /v1/models endpoints, so tools built for the OpenAI API can query You.com AI agents (express, research, advanced) and custom agent IDs.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ydc-agent
MCP server for You.com AI agents with OpenAI-compatible API.
📖 Other languages: 繁體中文 | 简体中文 | 日本語 (see README_ZH_TW.md, README_ZH_CN.md, README_JA.md)
MCP Configuration
Claude Desktop / Cursor / Windsurf
Add to your MCP config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Cursor/Windsurf: .cursor/mcp.json or .windsurf/mcp.json
{
"mcpServers": {
"ydc-agent": {
"command": "npx",
"args": ["-y", "ydc-agent"],
"env": {
"YDC_API_KEY": "your-api-key"
}
}
}
}With Multiple API Keys
{
"mcpServers": {
"ydc-agent": {
"command": "npx",
"args": ["-y", "ydc-agent"],
"env": {
"YDC_API_KEYS": "key1,key2,key3",
"YDC_KEY_MODE": "round-robin"
}
}
}
}Key modes: round-robin (default), sequential, random
Related MCP server: Web Search MCP Server
Available MCP Tools
Tool | Description |
| Web and news search (cached data, limited to 2024) |
| Fast AI answers (cached data, limited to 2024) |
| Complex reasoning with compute/research tools |
| Custom AI agent with intelligent prompt enhancement |
| OpenAI-compatible chat with conversation history |
| List active conversations |
| Get conversation history |
| Delete conversation |
| API key usage statistics |
| Start/stop OpenAI-compatible HTTP server |
Built-in AI Guidance
Tool descriptions include guidance for AI callers:
Tool | Built-in Feature |
| Guides AI to use |
| Guides AI to use |
| AI Capability Rule: If caller is GPT-3.5+, results are reference material only - use |
| Failure Tracking: Auto-tracks failures, suggests switching to |
AI Calling Decision Guide
⚠️ For GPT-3.5+ Level AI
If you are GPT-3.5 or above (GPT-4, Claude 3.5, etc.):
you_advancedresults are reference material, not authoritative answersUse
call_count=5+to gather multiple perspectives, then integrate with your own judgmentAvoid
call_count=1for single answers (wastes multi-perspective capability)
Quick Reference
Use Case | Tool | Parameters |
Diverse viewpoints |
|
|
Quick opinions |
|
|
Deep research |
|
|
Cached web search |
|
|
⚠️ Common Mistakes
Wrong | Correct |
|
|
Treat results as authoritative | Treat as reference, integrate yourself |
| Use |
Models / Agent Types
Model | Description |
| Fast responses |
| Deep analysis |
| Compute tools (default) |
| Full tools (compute + research) |
| Any custom You.com agent ID |
Custom Agent ID
You can use any custom You.com agent ID as the model name:
curl -X POST http://localhost:3002/v1/chat/completions \
-H "Authorization: Bearer token" \
-H "Content-Type: application/json" \
-d '{"model":"your-custom-agent-uuid","messages":[{"role":"user","content":"Hello"}]}'OpenAI-Compatible Server
Start via npx:
# Start with single API key
npx ydc-agent --openai --api-key YOUR_API_KEY
# Start with multiple API keys (round-robin)
npx ydc-agent --openai --api-keys KEY1,KEY2,KEY3
# With custom port and key mode
npx ydc-agent --openai --api-keys KEY1,KEY2 --port 3003 --key-mode random
# With access token authentication
npx ydc-agent --openai --api-key YOUR_API_KEY --access-token SECRET
# With custom agents (name:id format)
npx ydc-agent --openai --api-key YOUR_API_KEY --agent mybot:uuid-here --agent another:uuid2Or via MCP tool openai_server_control.
Endpoints
POST /v1/chat/completions- Chat completionsGET /v1/models- List modelsGET /health- Health check
Usage
curl -X POST http://localhost:3002/v1/chat/completions \
-H "Authorization: Bearer token" \
-H "Content-Type: application/json" \
-d '{"model":"express","messages":[{"role":"user","content":"Hello"}]}'Environment Variables
Variable | Description | Default |
| You.com API key | required |
| Multiple keys (comma-separated) | - |
| round-robin / sequential / random | round-robin |
| HTTP server port | 3002 |
| sqlite / memory | sqlite |
| Allowed tokens (comma-separated) | - |
| Custom agents (name:id,name2:id2) | - |
| you_agent failure threshold before disable | 3 |
PM2 Deployment
For production deployment with PM2:
# Using ecosystem config
pm2 start ecosystem.config.cjs
# Or direct command (Windows)
pm2 start "cmd /c npx ydc-agent --openai --api-key YOUR_KEY" --name ydcCloudflare Worker Deployment
Deploy as a serverless Cloudflare Worker with D1 database for conversation storage.
Quick Deploy
Manual Deploy
Create D1 database in Cloudflare Dashboard
Create Worker and paste
cloudflare/worker.jsAdd environment variables:
YDC_API_KEYS,ACCESS_TOKEN(optional)Bind D1 database as
YDC_DBVisit
/setupto initialize database
Worker Features
OpenAI & Anthropic API compatible
D1 database for conversation history
Multi API key support (random selection)
Custom agents via
CUSTOM_AGENTSenv varSetup page at
/setupfor configuration
See cloudflare/README.md for detailed instructions.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Web search, AI agent, and content extraction via You.com APIs
Web search and page reading for AI agents, including JSON APIs, RSS feeds and YouTube.
Web scraping, Google SERP, Markdown and ChatGPT/Gemini answers as typed tools for AI agents.
30+ web-access and AI APIs behind one key: search, scraping, browsers, voice, OCR and LLMs.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables web search, scraping, and live package version lookup for local LLMs, with no API keys required.52MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to search the web and extract content using multiple search providers, with caching, retry logic, and options for JavaScript-heavy page rendering.-
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to run parallel web searches through SearXNG and/or You.com and crawl individual pages or entire sites into clean, deduplicated Markdown or JSON, including authenticated and documentation-focused crawls.-
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to search the web via SearXNG and/or You.com and to crawl individual pages or whole sites into clean, deduplicated Markdown or JSON.-