@youdotcom-oss/mcp 1.2.4 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +594 -0
- package/CONTRIBUTING.md +246 -0
- package/README.md +187 -333
- package/bin/stdio.js +6707 -6017
- package/docs/API.md +319 -0
- package/package.json +55 -35
package/README.md
CHANGED
|
@@ -1,148 +1,102 @@
|
|
|
1
1
|
# You.com MCP Server
|
|
2
2
|
|
|
3
|
-
A Model Context Protocol (MCP) server that provides web search
|
|
3
|
+
A Model Context Protocol (MCP) server that provides web search, AI-powered answers, and content extraction using You.com APIs. Built with Bun runtime for optimal performance and supports multiple transport protocols for compatibility with different MCP clients.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- **Web and News Search**: Comprehensive search using You.com's unified Search API with advanced search operators
|
|
8
|
+
- **AI-Powered Express Agent**: Fast responses with optional real-time web search integration
|
|
9
|
+
- **Content Extraction**: Extract and retrieve full content from web pages in markdown or HTML format
|
|
8
10
|
- **Multiple Transport Protocols**: Stdio and Streamable HTTP support
|
|
9
11
|
- **Bearer Token Authentication**: Secure API access in HTTP mode
|
|
10
12
|
- **TypeScript Support**: Full type safety with Zod schemas
|
|
11
13
|
- **Advanced Search Parameters**: Site filtering, file type filtering, language filtering, exact terms, and exclude terms
|
|
12
14
|
|
|
13
|
-
##
|
|
15
|
+
## Getting Started
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
Get up and running with the You.com MCP Server in 4 quick steps:
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
- **Option 2: Local NPM Package** - Install via `npx @youdotcom-oss/mcp` with stdio transport, environment variable authentication, and runs locally on your machine
|
|
19
|
+
### 1. Get Your API Key
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
Visit [you.com/platform/api-keys](https://you.com/platform/api-keys) to get your You.com API key. Keep this key secure - you'll need it for configuration.
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
### 2. Choose Your Setup
|
|
24
|
+
|
|
25
|
+
**Remote Server (Recommended)** - No installation, always up-to-date, just add the URL and API key
|
|
26
|
+
- Use `https://api.you.com/mcp` with HTTP transport
|
|
27
|
+
- Authentication via `Authorization: Bearer <your-key>` header
|
|
28
|
+
|
|
29
|
+
**NPM Package** - Runs locally on your machine
|
|
30
|
+
- Use `npx @youdotcom-oss/mcp` with stdio transport
|
|
31
|
+
- Authentication via `YDC_API_KEY` environment variable
|
|
32
|
+
- Requires Bun or Node.js
|
|
33
|
+
|
|
34
|
+
### 3. Configure Your Client
|
|
35
|
+
|
|
36
|
+
Choose your MCP client from the [detailed setup guides](#adding-to-your-mcp-client) below. Most clients use this basic structure:
|
|
37
|
+
|
|
38
|
+
**Remote Server:**
|
|
23
39
|
```json
|
|
24
40
|
{
|
|
25
41
|
"mcpServers": {
|
|
26
42
|
"ydc-search": {
|
|
27
43
|
"type": "http",
|
|
28
44
|
"url": "https://api.you.com/mcp",
|
|
29
|
-
"headers": {
|
|
30
|
-
"Authorization": "Bearer <you-api-key>"
|
|
31
|
-
}
|
|
45
|
+
"headers": { "Authorization": "Bearer <you-api-key>" }
|
|
32
46
|
}
|
|
33
47
|
}
|
|
34
48
|
}
|
|
35
49
|
```
|
|
36
50
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Fast AI-powered agent for quick responses with optional real-time web search integration.
|
|
40
|
-
|
|
41
|
-
**Parameters:**
|
|
42
|
-
- `input` (string, required): The query or instruction to send to the Express agent. Example: "What is the capital of France?"
|
|
43
|
-
- `tools` (array, optional): Array of tool objects to expand the agent's capabilities. Currently supports:
|
|
44
|
-
- `{ type: "web_search" }` - Enables real-time web search to provide more accurate and up-to-date information
|
|
45
|
-
|
|
46
|
-
**Features:**
|
|
47
|
-
- Fast response times optimized for straightforward queries
|
|
48
|
-
- Optional web search integration for real-time information
|
|
49
|
-
- AI-synthesized answers with source citations (when web_search is enabled)
|
|
50
|
-
- Progress notifications support (when client provides `progressToken` in request metadata)
|
|
51
|
-
- Non-streaming JSON responses for reliability
|
|
52
|
-
|
|
53
|
-
**Response Structure:**
|
|
54
|
-
|
|
55
|
-
The tool returns a token-efficient MCP response format:
|
|
56
|
-
- `answer` (string, required): AI-synthesized answer from the Express agent
|
|
57
|
-
- `results` (object, optional): Web search results included when `web_search` tool is used
|
|
58
|
-
- `web` (array): Array of search result objects, each containing:
|
|
59
|
-
- `url` (string): The URL of the search result
|
|
60
|
-
- `title` (string): The title of the search result
|
|
61
|
-
- `snippet` (string): A text snippet from the search result
|
|
62
|
-
- `agent` (string, optional): Agent identifier (e.g., "express")
|
|
63
|
-
|
|
64
|
-
**Example 1: Simple query without web_search**
|
|
65
|
-
|
|
66
|
-
Input:
|
|
67
|
-
```json
|
|
68
|
-
{
|
|
69
|
-
"input": "What is 2 + 2?"
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Response:
|
|
51
|
+
**NPM Package:**
|
|
74
52
|
```json
|
|
75
53
|
{
|
|
76
|
-
"
|
|
77
|
-
{
|
|
78
|
-
"
|
|
79
|
-
"
|
|
54
|
+
"mcpServers": {
|
|
55
|
+
"ydc-search": {
|
|
56
|
+
"command": "npx",
|
|
57
|
+
"args": ["@youdotcom-oss/mcp"],
|
|
58
|
+
"env": { "YDC_API_KEY": "<you-api-key>" }
|
|
80
59
|
}
|
|
81
|
-
],
|
|
82
|
-
"structuredContent": {
|
|
83
|
-
"answer": "2 + 2 equals 4.",
|
|
84
|
-
"agent": "express"
|
|
85
60
|
}
|
|
86
61
|
}
|
|
87
62
|
```
|
|
88
63
|
|
|
89
|
-
|
|
64
|
+
### 4. Test Your Setup
|
|
90
65
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
66
|
+
Ask your AI agent a simple query to verify everything works:
|
|
67
|
+
- "Search the web for the latest news about artificial intelligence"
|
|
68
|
+
- "What is the capital of France?" (with web search)
|
|
69
|
+
- "Extract the content from https://example.com"
|
|
70
|
+
|
|
71
|
+
Your agent will automatically use the appropriate tool based on your natural language request.
|
|
72
|
+
|
|
73
|
+
## Adding to your MCP client
|
|
74
|
+
|
|
75
|
+
Detailed configuration instructions for specific MCP clients. See [Getting Started](#getting-started) above for a quick overview.
|
|
76
|
+
|
|
77
|
+
### Standard Configuration Templates
|
|
78
|
+
|
|
79
|
+
**Configuration Notes:**
|
|
80
|
+
- Remote server recommended for most users (no installation, always up-to-date)
|
|
81
|
+
- NPM package for local usage or self-hosting scenarios
|
|
82
|
+
- HTTP transport for remote connections; stdio transport for local packages
|
|
83
|
+
- API key always required (header for HTTP, environment variable for stdio)
|
|
98
84
|
|
|
99
|
-
|
|
85
|
+
**Remote Server (Recommended):**
|
|
100
86
|
```json
|
|
101
87
|
{
|
|
102
|
-
"
|
|
103
|
-
{
|
|
104
|
-
"type": "
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"text": "\nSearch Results:\n\nTitle: Paris - Wikipedia\nURL: https://en.wikipedia.org/wiki/Paris\nSnippet: Paris is the capital and most populous city of France. With an official estimated population of 2,102,650 residents...\n\nTitle: Paris | History, Map, Population, & Facts | Britannica\nURL: https://www.britannica.com/place/Paris\nSnippet: Paris, city and capital of France, situated in the north-central part of the country..."
|
|
88
|
+
"mcpServers": {
|
|
89
|
+
"ydc-search": {
|
|
90
|
+
"type": "http",
|
|
91
|
+
"url": "https://api.you.com/mcp",
|
|
92
|
+
"headers": {
|
|
93
|
+
"Authorization": "Bearer <you-api-key>"
|
|
94
|
+
}
|
|
110
95
|
}
|
|
111
|
-
],
|
|
112
|
-
"structuredContent": {
|
|
113
|
-
"answer": "The capital of France is Paris, the country's largest city and its political, economic, and cultural center...",
|
|
114
|
-
"results": {
|
|
115
|
-
"web": [
|
|
116
|
-
{
|
|
117
|
-
"url": "https://en.wikipedia.org/wiki/Paris",
|
|
118
|
-
"title": "Paris - Wikipedia",
|
|
119
|
-
"snippet": "Paris is the capital and most populous city of France. With an official estimated population of 2,102,650 residents..."
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"url": "https://www.britannica.com/place/Paris",
|
|
123
|
-
"title": "Paris | History, Map, Population, & Facts | Britannica",
|
|
124
|
-
"snippet": "Paris, city and capital of France, situated in the north-central part of the country..."
|
|
125
|
-
}
|
|
126
|
-
]
|
|
127
|
-
},
|
|
128
|
-
"agent": "express"
|
|
129
96
|
}
|
|
130
97
|
}
|
|
131
98
|
```
|
|
132
99
|
|
|
133
|
-
**Progress Notifications:**
|
|
134
|
-
|
|
135
|
-
When a client provides a `progressToken` in the request metadata, the tool sends progress notifications at key milestones:
|
|
136
|
-
- 0% - Starting Express agent query
|
|
137
|
-
- 33% - Connecting to You.com API
|
|
138
|
-
- 100% - Complete (implicit with final response)
|
|
139
|
-
|
|
140
|
-
**Notes:**
|
|
141
|
-
- The `content` array always displays the answer first, followed by search results (if web_search was used)
|
|
142
|
-
- The response format is optimized for token efficiency, returning only essential fields
|
|
143
|
-
- Search results are formatted consistently with the `you-search` tool using shared formatting utilities
|
|
144
|
-
```
|
|
145
|
-
|
|
146
100
|
**Local NPM Package:**
|
|
147
101
|
```json
|
|
148
102
|
{
|
|
@@ -435,283 +389,183 @@ Use [mcp-remote](https://www.npmjs.com/package/mcp-remote) to bridge HTTP to std
|
|
|
435
389
|
|
|
436
390
|
</details>
|
|
437
391
|
|
|
438
|
-
|
|
392
|
+
## Available Tools
|
|
439
393
|
|
|
440
|
-
|
|
441
|
-
- **NPM Package:** Alternative for local usage or when you prefer running locally
|
|
442
|
-
- **HTTP Transport:** Use for remote server connections and web applications
|
|
443
|
-
- **Stdio Transport:** Use for local npm package installations and development
|
|
444
|
-
- **API Key:** Always required - either as environment variable (stdio) or in headers (http)
|
|
445
|
-
- **Docker/Local Development:** See sections below for advanced local development setups
|
|
394
|
+
This MCP server provides three tools that work seamlessly with your AI agent through natural language:
|
|
446
395
|
|
|
447
|
-
|
|
396
|
+
### you-search
|
|
397
|
+
Comprehensive web and news search with advanced filtering capabilities. Perfect for finding current information, research articles, documentation, and news stories.
|
|
448
398
|
|
|
449
|
-
|
|
399
|
+
**When to use**: When you need to search the web for information, filter by specific sites/file types, or get the latest news on a topic.
|
|
450
400
|
|
|
451
|
-
###
|
|
401
|
+
### you-express
|
|
402
|
+
Fast AI-powered agent that provides synthesized answers with optional real-time web search. Ideal for straightforward questions that benefit from AI interpretation.
|
|
452
403
|
|
|
453
|
-
|
|
454
|
-
- You.com API key (get one at [api.you.com](https://api.you.com))
|
|
404
|
+
**When to use**: When you want a direct answer to a question, with optional web search for up-to-date context and citations.
|
|
455
405
|
|
|
456
|
-
###
|
|
406
|
+
### you-contents
|
|
407
|
+
Extract full page content from URLs in markdown or HTML format. Useful for documentation analysis, content processing, and batch URL extraction.
|
|
457
408
|
|
|
458
|
-
|
|
409
|
+
**When to use**: When you need to extract and analyze content from web pages, either for reading or processing in your workflow.
|
|
459
410
|
|
|
460
|
-
|
|
461
|
-
# Clone the repository
|
|
462
|
-
git clone <repository-url>
|
|
463
|
-
cd you-mcp-server
|
|
411
|
+
---
|
|
464
412
|
|
|
465
|
-
|
|
466
|
-
bun install
|
|
413
|
+
**Note**: Your MCP client automatically shows you all available parameters and their descriptions when you use these tools. Simply ask your AI agent in natural language what you want to do, and it will orchestrate the appropriate tool calls for you.
|
|
467
414
|
|
|
468
|
-
|
|
469
|
-
echo "export YDC_API_KEY=<you-api-key>" > .env
|
|
470
|
-
```
|
|
415
|
+
## Use Cases & Examples
|
|
471
416
|
|
|
472
|
-
|
|
417
|
+
Here are common scenarios showing when and how to use each tool with natural language queries:
|
|
473
418
|
|
|
474
|
-
|
|
475
|
-
# Build is optional for development, required for production bin executables
|
|
476
|
-
bun run build # Builds only stdio.ts to bin/stdio.js
|
|
477
|
-
```
|
|
419
|
+
### Research & Information Gathering
|
|
478
420
|
|
|
479
|
-
**
|
|
480
|
-
|
|
421
|
+
**Use you-search when:**
|
|
422
|
+
- "Find recent research papers about quantum computing on arxiv.org"
|
|
423
|
+
- "Search for TypeScript documentation about generics"
|
|
424
|
+
- "Get the latest news about renewable energy from the past week"
|
|
425
|
+
- "Find PDF files about machine learning algorithms"
|
|
481
426
|
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
"command": "bun",
|
|
488
|
-
"args": ["/full/path/to/you-mcp-server/src/stdio.ts"],
|
|
489
|
-
"env": {
|
|
490
|
-
"YDC_API_KEY": "<you-api-key>"
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
```
|
|
427
|
+
**Use you-express when:**
|
|
428
|
+
- "What are the key differences between REST and GraphQL?"
|
|
429
|
+
- "Explain how quantum entanglement works"
|
|
430
|
+
- "What happened in the tech industry today?" (with web search enabled)
|
|
431
|
+
- "Summarize the main features of the latest Python release"
|
|
496
432
|
|
|
497
|
-
|
|
498
|
-
```json
|
|
499
|
-
{
|
|
500
|
-
"mcpServers": {
|
|
501
|
-
"ydc-search": {
|
|
502
|
-
"type": "stdio",
|
|
503
|
-
"command": "node",
|
|
504
|
-
"args": ["/full/path/to/you-mcp-server/bin/stdio.js"],
|
|
505
|
-
"env": {
|
|
506
|
-
"YDC_API_KEY": "<you-api-key>"
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
```
|
|
433
|
+
### Content Extraction & Analysis
|
|
512
434
|
|
|
513
|
-
|
|
435
|
+
**Use you-contents when:**
|
|
436
|
+
- "Extract the content from this blog post: https://example.com/article"
|
|
437
|
+
- "Get the documentation from these three URLs in markdown format"
|
|
438
|
+
- "Pull the HTML content from this page preserving the layout"
|
|
439
|
+
- "Batch extract content from these 5 documentation pages"
|
|
514
440
|
|
|
515
|
-
|
|
441
|
+
### Combined Workflows
|
|
516
442
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
443
|
+
Your AI agent can combine multiple tools in a single conversation:
|
|
444
|
+
1. **Research + Extract**: "Search for the best TypeScript tutorials, then extract the content from the top 3 results"
|
|
445
|
+
2. **Question + Deep Dive**: "What is WebAssembly? Then search for real-world examples and extract code samples"
|
|
446
|
+
3. **News + Analysis**: "Find recent articles about AI regulation, then summarize the key points"
|
|
521
447
|
|
|
522
|
-
|
|
523
|
-
```bash
|
|
524
|
-
echo "export YDC_API_KEY=your-actual-api-key-here" > .env
|
|
525
|
-
source .env
|
|
526
|
-
```
|
|
448
|
+
### Pro Tips
|
|
527
449
|
|
|
528
|
-
|
|
450
|
+
- **Be specific**: Include domains, date ranges, or file types when searching
|
|
451
|
+
- **Natural language**: You don't need to memorize parameters - just describe what you want
|
|
452
|
+
- **Follow up**: Ask clarifying questions to refine results
|
|
453
|
+
- **Combine tools**: Let your agent orchestrate multiple tool calls for complex workflows
|
|
529
454
|
|
|
530
|
-
|
|
531
|
-
export YDC_API_KEY="your-api-key-here"
|
|
532
|
-
```
|
|
455
|
+
## Troubleshooting & Support
|
|
533
456
|
|
|
534
|
-
###
|
|
457
|
+
### Common Issues
|
|
535
458
|
|
|
536
|
-
|
|
537
|
-
-
|
|
538
|
-
-
|
|
539
|
-
-
|
|
540
|
-
-
|
|
541
|
-
- `bun run test:coverage:watch` - Run tests with coverage in watch mode
|
|
542
|
-
- `bun run check` - Run Biome linting and formatting checks
|
|
543
|
-
- `bun run check:write` - Auto-fix linting and formatting issues
|
|
544
|
-
- `bun run inspect` - Start MCP inspector with environment variables loaded
|
|
545
|
-
- `bun run prepare` - Set up git hooks for the repository
|
|
459
|
+
**Server not connecting:**
|
|
460
|
+
- Verify your API key is correct and properly formatted
|
|
461
|
+
- Check that your MCP client configuration matches the template for your setup (remote vs local)
|
|
462
|
+
- For HTTP mode: Ensure the Authorization header includes "Bearer " prefix
|
|
463
|
+
- For stdio mode: Verify the YDC_API_KEY environment variable is set
|
|
546
464
|
|
|
547
|
-
|
|
465
|
+
**Tool not working:**
|
|
466
|
+
- Check your MCP client logs for error messages
|
|
467
|
+
- Verify your API key has the necessary permissions
|
|
468
|
+
- For remote server: Ensure you can reach https://api.you.com/mcp-health
|
|
469
|
+
- For local: Verify Bun or Node.js is installed and the package is properly set up
|
|
548
470
|
|
|
549
|
-
|
|
550
|
-
-
|
|
551
|
-
-
|
|
471
|
+
**Authentication errors:**
|
|
472
|
+
- Remote server uses Bearer token authentication in headers
|
|
473
|
+
- Local stdio mode uses YDC_API_KEY environment variable
|
|
474
|
+
- Make sure you're using the correct authentication method for your setup
|
|
552
475
|
|
|
553
|
-
###
|
|
476
|
+
### Error Logs
|
|
554
477
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
bun src/stdio.ts
|
|
478
|
+
Error messages and detailed logs appear in your MCP client's log output. Check your client's documentation for how to access logs:
|
|
479
|
+
- Claude Code: Check terminal output or logs
|
|
480
|
+
- Claude Desktop: View logs in application menu
|
|
481
|
+
- Cursor: Check MCP server logs in settings
|
|
482
|
+
- VS Code: View Output panel for MCP server logs
|
|
561
483
|
|
|
562
|
-
|
|
563
|
-
bun run build # Build first
|
|
564
|
-
./bin/stdio.js # Run built version
|
|
565
|
-
```
|
|
484
|
+
### Report an Issue
|
|
566
485
|
|
|
567
|
-
|
|
568
|
-
```bash
|
|
569
|
-
# Default port 4000
|
|
570
|
-
bun start
|
|
571
|
-
# or
|
|
572
|
-
./bin/http
|
|
486
|
+
If you encounter a problem, you can report it via email or GitHub:
|
|
573
487
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
488
|
+
**Email Support:** support@you.com
|
|
489
|
+
|
|
490
|
+
**Web Support:** [You.com Support](https://you.com/support/contact-us)
|
|
491
|
+
|
|
492
|
+
**GitHub Issues:** [Report bugs and feature requests](https://github.com/youdotcom-oss/youdotcom-mcp-server/issues)
|
|
493
|
+
|
|
494
|
+
**Tip:** When errors occur, check your MCP client logs - they include a pre-filled mailto link with error details for easy reporting.
|
|
495
|
+
|
|
496
|
+
## For Contributors
|
|
579
497
|
|
|
580
|
-
|
|
498
|
+
Interested in contributing to the You.com MCP Server? We'd love your help!
|
|
581
499
|
|
|
582
|
-
**
|
|
500
|
+
**Note:** This section is for contributors and self-hosting only. Most users should use the remote server or NPM package from [Getting Started](#getting-started).
|
|
583
501
|
|
|
502
|
+
### Development Setup
|
|
503
|
+
|
|
504
|
+
For complete development setup instructions, code style guidelines, testing patterns, and contribution workflow, see [AGENTS.md](./AGENTS.md).
|
|
505
|
+
|
|
506
|
+
The developer guide includes:
|
|
507
|
+
- Local workspace setup with Bun runtime
|
|
508
|
+
- Code style preferences and TypeScript guidelines
|
|
509
|
+
- MCP-specific patterns and best practices
|
|
510
|
+
- Testing strategy and examples
|
|
511
|
+
- Git hooks and code quality tools
|
|
512
|
+
- API integration details
|
|
513
|
+
- Architecture overview with diagrams
|
|
514
|
+
- Troubleshooting common issues
|
|
515
|
+
- Contributing guidelines with commit conventions
|
|
516
|
+
|
|
517
|
+
### Local Development & Self-Hosting
|
|
518
|
+
|
|
519
|
+
**Quick Docker Setup**:
|
|
584
520
|
```bash
|
|
585
|
-
# Build the optimized Docker image (243MB final size)
|
|
586
521
|
docker build -t youdotcom-mcp-server .
|
|
587
|
-
|
|
588
|
-
# Run the container
|
|
589
522
|
docker run -d -p 4000:4000 --name youdotcom-mcp youdotcom-mcp-server
|
|
590
523
|
```
|
|
591
524
|
|
|
592
|
-
**
|
|
593
|
-
- **Multi-stage build**: Uses standalone binary compilation with `bun build --compile`
|
|
594
|
-
- **Minimal base image**: Ubuntu 22.04 with no additional packages
|
|
595
|
-
- **Size optimized**: 243MB final image
|
|
596
|
-
- **Self-contained**: Includes Bun runtime in compiled binary
|
|
597
|
-
- **Security**: Runs as non-root user, minimal attack surface
|
|
598
|
-
|
|
599
|
-
**Using Docker Compose:**
|
|
600
|
-
|
|
601
|
-
Create a `docker-compose.yml` file:
|
|
602
|
-
```yaml
|
|
603
|
-
version: '3.8'
|
|
604
|
-
services:
|
|
605
|
-
you-mcp-server:
|
|
606
|
-
build: .
|
|
607
|
-
ports:
|
|
608
|
-
- "4000:4000"
|
|
609
|
-
environment:
|
|
610
|
-
- YDC_API_KEY=${YDC_API_KEY}
|
|
611
|
-
- PORT=4000
|
|
612
|
-
restart: unless-stopped
|
|
613
|
-
```
|
|
614
|
-
|
|
615
|
-
Then run:
|
|
525
|
+
**Local Workspace Setup**:
|
|
616
526
|
```bash
|
|
617
|
-
|
|
618
|
-
|
|
527
|
+
# Clone and install
|
|
528
|
+
git clone https://github.com/youdotcom-oss/youdotcom-mcp-server.git
|
|
529
|
+
cd youdotcom-mcp-server
|
|
530
|
+
bun install
|
|
619
531
|
|
|
620
|
-
|
|
532
|
+
# Set up environment
|
|
533
|
+
echo "export YDC_API_KEY=your-api-key-here" > .env
|
|
534
|
+
source .env
|
|
621
535
|
|
|
622
|
-
|
|
536
|
+
# Run development server (stdio mode)
|
|
537
|
+
bun run dev
|
|
623
538
|
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
```
|
|
539
|
+
# Or run HTTP server (port 4000)
|
|
540
|
+
bun start
|
|
541
|
+
```
|
|
628
542
|
|
|
629
|
-
|
|
630
|
-
- Copy `.mcp.example.json` to `.mcp.json`
|
|
631
|
-
- Replace `<you.com api key>` with your actual You.com API key
|
|
543
|
+
For detailed instructions on building from source, running in different modes, and deployment options, see [AGENTS.md](./AGENTS.md).
|
|
632
544
|
|
|
633
|
-
|
|
634
|
-
cp .mcp.example.json .mcp.json
|
|
635
|
-
```
|
|
545
|
+
### Quick Links
|
|
636
546
|
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
"ydc-search": {
|
|
642
|
-
"type": "http",
|
|
643
|
-
"url": "http://localhost:4000/mcp",
|
|
644
|
-
"headers": {
|
|
645
|
-
"Authorization": "Bearer <you-api-key>"
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
```
|
|
547
|
+
- **Developer Guide**: [AGENTS.md](./AGENTS.md) - Complete technical reference
|
|
548
|
+
- **Report Issues**: [GitHub Issues](https://github.com/youdotcom-oss/youdotcom-mcp-server/issues)
|
|
549
|
+
- **Source Code**: [GitHub Repository](https://github.com/youdotcom-oss/youdotcom-mcp-server)
|
|
550
|
+
- **API Documentation**: [You.com Docs](https://documentation.you.com/get-started/welcome)
|
|
651
551
|
|
|
652
|
-
|
|
653
|
-
- The server will be available at `http://localhost:4000/mcp`
|
|
654
|
-
- Health check endpoint: `http://localhost:4000/mcp-health`
|
|
552
|
+
### How to Contribute
|
|
655
553
|
|
|
656
|
-
|
|
554
|
+
1. Fork the repository
|
|
555
|
+
2. Create a feature branch following naming conventions in AGENTS.md
|
|
556
|
+
3. Follow the code style guidelines and use conventional commits
|
|
557
|
+
4. Write tests for your changes (maintain >80% coverage)
|
|
558
|
+
5. Run quality checks: `bun run check && bun test`
|
|
559
|
+
6. Submit a pull request with a clear description
|
|
657
560
|
|
|
658
|
-
|
|
561
|
+
We appreciate all contributions, whether it's:
|
|
562
|
+
- Bug fixes
|
|
563
|
+
- New features
|
|
564
|
+
- Documentation improvements
|
|
565
|
+
- Performance optimizations
|
|
566
|
+
- Test coverage improvements
|
|
659
567
|
|
|
660
|
-
|
|
568
|
+
---
|
|
661
569
|
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
**Parameters:**
|
|
665
|
-
- `query` (string, required): The base search query to send to the You.com API. This will be combined with additional filters like site, fileType, and language to create the final search query. You can also use operators directly: + (exact term, e.g., "Enron +GAAP"), - (exclude term, e.g., "guitar -prs"), site: (domain, e.g., "site:uscourts.gov"), filetype: (e.g., "filetype:pdf"), lang: (e.g., "lang:es"). Use parentheses for multi-word phrases (e.g., "+(machine learning)", "-(social media)").
|
|
666
|
-
- `site` (string, optional): Search within a specific website domain (e.g., 'github.com')
|
|
667
|
-
- `fileType` (string, optional): Filter by a specific file type (e.g., 'pdf', 'doc', 'txt')
|
|
668
|
-
- `language` (string, optional): Filter by a specific language using ISO 639-1 code (e.g., 'en', 'es', 'fr')
|
|
669
|
-
- `exactTerms` (string, optional): Exact terms with logical operators: 'python AND|tutorial|NOT beginner' (pipe-separated, add AND/OR after terms, default OR). Use parentheses for multi-word phrases (e.g., '(machine learning)|typescript')
|
|
670
|
-
- `excludeTerms` (string, optional): Terms to exclude with logical operators: 'spam AND|ads|NOT relevant' (pipe-separated, add AND/OR after terms, default OR). Use parentheses for multi-word phrases (e.g., '(social media)|ads'). Cannot be used with exactTerms.
|
|
671
|
-
- `count` (integer, optional): Maximum number of results to return per section. Range: 1-20.
|
|
672
|
-
- `freshness` (string, optional): Freshness of results. Options: `day`, `week`, `month`, `year`.
|
|
673
|
-
- `offset` (integer, optional): Offset for pagination (calculated in multiples of count). Range: 0-9.
|
|
674
|
-
- `country` (string, optional): Country code for localized results. Examples: `US`, `GB`, `DE`, `FR`, `JP`, `CA`, `AU`, etc.
|
|
675
|
-
- `safesearch` (string, optional): Content filtering level. Options: `off`, `moderate` (default), `strict`.
|
|
676
|
-
|
|
677
|
-
**Returns:**
|
|
678
|
-
```json
|
|
679
|
-
{
|
|
680
|
-
"content": [
|
|
681
|
-
{
|
|
682
|
-
"type": "text",
|
|
683
|
-
"text": "Search Results for \"machine learning\":\n\nWEB RESULTS:\n\nTitle: Introduction to Machine Learning\nURL: https://github.com/ml-tutorials/intro\nDescription: A comprehensive guide to machine learning fundamentals\nSnippets:\n- Learn the basics of supervised and unsupervised learning\n- Practical examples with Python and TensorFlow\n\n---\n\nTitle: Machine Learning Course\nURL: https://coursera.org/ml-course\nDescription: Stanford's machine learning course materials\nSnippets:\n- Mathematical foundations of ML algorithms\n- Hands-on programming assignments\n\n==================================================\n\nNEWS RESULTS:\n\nTitle: AI Breakthrough in Medical Diagnosis\nURL: https://techcrunch.com/ai-medical-breakthrough\nDescription: New machine learning model achieves 95% accuracy\nPublished: 2024-01-15T10:30:00"
|
|
684
|
-
}
|
|
685
|
-
],
|
|
686
|
-
"structuredContent": {
|
|
687
|
-
"results": {
|
|
688
|
-
"web": [
|
|
689
|
-
{
|
|
690
|
-
"url": "https://github.com/ml-tutorials/intro",
|
|
691
|
-
"title": "Introduction to Machine Learning",
|
|
692
|
-
"description": "A comprehensive guide to machine learning fundamentals",
|
|
693
|
-
"snippets": [
|
|
694
|
-
"Learn the basics of supervised and unsupervised learning",
|
|
695
|
-
"Practical examples with Python and TensorFlow"
|
|
696
|
-
],
|
|
697
|
-
"page_age": "2024-01-10T14:20:00",
|
|
698
|
-
"authors": ["ML Tutorial Team"]
|
|
699
|
-
}
|
|
700
|
-
],
|
|
701
|
-
"news": [
|
|
702
|
-
{
|
|
703
|
-
"url": "https://techcrunch.com/ai-medical-breakthrough",
|
|
704
|
-
"title": "AI Breakthrough in Medical Diagnosis",
|
|
705
|
-
"description": "New machine learning model achieves 95% accuracy",
|
|
706
|
-
"page_age": "2024-01-15T10:30:00"
|
|
707
|
-
}
|
|
708
|
-
]
|
|
709
|
-
},
|
|
710
|
-
"metadata": {
|
|
711
|
-
"query": "machine learning",
|
|
712
|
-
"request_uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
|
|
713
|
-
"latency": 0.247
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
```
|
|
570
|
+
**License**: MIT
|
|
571
|
+
**Author**: You.com (https://you.com)
|