Metadata-Version: 2.4
Name: morph-websearch-mcp
Version: 0.1.0
Summary: Web search MCP server with AI-powered content extraction
License-Expression: MIT
Requires-Python: >=3.13
Description-Content-Type: text/markdown
Requires-Dist: mcp>=1.0.0
Requires-Dist: crawl4ai>=0.4.0
Requires-Dist: requests>=2.31.0
Requires-Dist: openai>=1.0.0
Requires-Dist: beautifulsoup4>=4.12.0

# websearch-mcp

MCP server providing web search, web fetch, and AI-powered web extraction — all results compacted for minimal context usage.

## Tools

| Tool | Input | Output |
|------|-------|--------|
| `websearch` | `{query, num_results?}` | `[{title, url, snippet, content}]` |
| `webfetch` | `{url}` | `{url, content}` |
| `webextract` | `{query}` | `{answer, sources: [{title, url}]}` |

All page content is compacted via morph before returning, stripping irrelevant boilerplate.

## Install

```bash
pip install morph-websearch-mcp
# or
uv add morph-websearch-mcp
```

## Setup

Set your morph API key:

```bash
export MORPH_API_KEY="sk-..."
```

## MCP Client Config

```json
{
  "mcpServers": {
    "websearch-mcp": {
      "command": "websearch-mcp",
      "env": {
        "MORPH_API_KEY": "sk-..."
      }
    }
  }
}
```

If installing from source:

```json
{
  "mcpServers": {
    "websearch-mcp": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/websearch-mcp", "main.py"],
      "env": {
        "MORPH_API_KEY": "sk-..."
      }
    }
  }
}
```
