Metadata-Version: 2.4
Name: yacy-mcp
Version: 0.1.0
Summary: MCP (Model Context Protocol) Server implementation that provides AI tools to search using YaCy web search API
Project-URL: Homepage, https://github.com/koosty/yacy-mcp
Project-URL: Repository, https://github.com/koosty/yacy-mcp
Project-URL: Bug Reports, https://github.com/koosty/yacy-mcp/issues
Author-email: Koosty <ken.kustian@gmail.com>
License: MIT
Keywords: ai,mcp,model-context-protocol,search,yacy
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: httpx>=0.28.1
Requires-Dist: mcp>=1.2.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# YaCy MCP Server

MCP (Model Context Protocol) Server implementation that provides AI tools to search using YaCy web search API.

## Installation

1. Make sure you have `uv` installed:

```bash
pip install uv
```

2. Install the package in development mode:

```bash
cd yacy-mcp
uv sync  # Sync all dependencies from pyproject.toml and uv.lock
```

Or alternatively:

```bash
cd yacy-mcp
uv pip install -e .
```

## Usage

1. Make sure you have a YaCy server running (typically on http://localhost:8090)
2. Set environment variables (optional):

```bash
export YACY_URL=http://localhost:8090
```

3. Run the MCP server:

```bash
python -m yacy_mcp
```

## Configuration

The server can be configured using environment variables:

- `YACY_URL`: URL of your YaCy instance (default: http://localhost:8090)

## Available Tools

- `yacy-search`: Search using YaCy web search engine
  - Parameters:
    - `query` (string, required): Search query string
    - `max_results` (integer, optional): Maximum number of results to return (default: 10)
    - `resource` (string, optional): Search resource (local or global, default: global)

## MCP Configuration for AI Applications

To use this server with AI applications that support the Model Context Protocol (MCP), configure your MCP client to connect to the server using stdio transport.

Example configuration for Claude Desktop (settings.json):
```json
{
  "mcpServers": {
    "yacy-mcp": {
      "command": "uvx",
      "args": ["yacy_mcp"],
      "env": {
        "YACY_URL": "http://localhost:8090"
      }
    }
  }
}
```

For other MCP-compatible applications, use the command `uvx yacy_mcp` as the server executable. The server will be automatically fetched and run from PyPI.

## Integration with AI Applications

This MCP server can be used with AI applications that support the Model Context Protocol to perform web searches using the YaCy search engine.