semvec/pypi-packages huggingface dataset:
mcp-openai-websearch 0.1.5
using openai websearch as mcp server
Requires Python: >=3.10

# OpenAI WebSearch MCP Servr

This MCP server provides access to OpenAI's websearch functionality through the Model Context Protocol. It allows AI assistants to search the web during conversations with users, providing up-to-date information that may not be available in the assistant's training data. The server can be installed and configured for use with Claude.app or Zed editor.

### Available Tools

- `web_search` - Call openai websearch as tool.
  - Required arguments:
    - `type` (string): web_search_preview
    - `search_context_size` (string): High level guidance for the amount of context window space to use for the search. One of low, medium, or high. medium is the default.
    - `user_location` (object or null)
      - `type` (string): The type of location > approximation. Always approximate.
      - `city` (string): Free text input for the city of the user, e.g. San Francisco.
      - `country` (string): The two-letter ISO country code of the user, e.g. US.
      - `region` (string): Free text input for the region of the user, e.g. California.
      - `timezone` (string): The IANA timezone of the user, e.g. America/Los_Angeles.

## Installation

### Using uv (recommended)

When using [`uv`](https://docs.astral.sh/uv/) no specific installation is needed. We will
use [`uvx`](https://docs.astral.sh/uv/guides/tools/) to directly run *openai-websearch-mcp*.

### Using PIP

Alternatively you can install `openai-websearch-mcp` via pip:

```bash
pip install openai-websearch-mcp
```

After installation, you can run it as a script using:

```bash
python -m openai-websearch-mcp
```

## Configuration

### Configure for Claude.app

Add to your Claude settings:

<details>
<summary>Using uvx</summary>

```json
"mcpServers": {
  "openai-websearch-mcp": {
    "command": "uvx",
    "args": ["openai-websearch-mcp"],
    "env": {
        "OPENAI_API_KEY": "your-api-key-here"
    }
  }
}
```
</details>

<details>
<summary>Using pip installation</summary>

```json
"mcpServers": {
  "openai-websearch-mcp": {
    "command": "python",
    "args": ["-m", "mcp_openai_websearch"],
    "env": {
        "OPENAI_API_KEY": "your-api-key-here"
    }
  }
}
```
</details>

### Configure for Zed

Add to your Zed settings.json:

<details>
<summary>Using uvx</summary>

```json
"context_servers": [
  "openai-websearch-mcp": {
    "command": "uvx",
    "args": ["openai-websearch-mcp"],
    "env": {
        "OPENAI_API_KEY": "your-api-key-here"
    }
  }
],
```
</details>

<details>
<summary>Using pip installation</summary>

```json
"context_servers": {
  "openai-websearch-mcp": {
    "command": "python",
    "args": ["-m", "mcp_openai_websearch"],
    "env": {
        "OPENAI_API_KEY": "your-api-key-here"
    }
  }
},
```
</details>


## Debugging

You can use the MCP inspector to debug the server. For uvx installations:

```bash
npx @modelcontextprotocol/inspector uvx openai-websearch-mcp
```
openai-agents-mcptool 0.1.1
A tool for integrating MCP with OpenAI Agents SDK
Requires Python: >=3.6

安装方法：pip install mcptool。

使用示例：
from openai_agents import Agent

# 创建 MCPTool 实例
mcp_tool = MCPTool(server_name="database_server", auth_token="your_auth_token")

# 创建代理并注册工具
agent = Agent(tools=[mcp_tool])

# 为代理设置指令
agent.set_instructions(
    "如果用户请求数据库中的数据，使用 MCPTool 的 query_resource 方法；"
    "如果用户需要执行特定操作，使用 MCPTool 的 call_tool 方法。"
)



运行测试：
安装 pip install mcp

python -m unittest discover
code-qfire 0.1.0
A lightweight code optimization tool
Requires Python: >=3.6

# CODE-QFIRE
CODE-QFIRE is a lightweight tool that scans code for inefficiencies and suggests optimizations.

## Features:
- Detects nested loops (O(nÂ²) inefficiency)
- Finds unused variables
- Identifies slow SQL queries (`SELECT * FROM` without indexing)

## Usage:
```bash
code-qfire scan my_script.py
django-admin-more-buttons 0.0.1
Add more buttons with custom behavior to your django admin's submit line.
Requires Python: >=3.7

# More buttons in admin

Add more buttons with custom behavior to your admin's submit line.

## Using

1. Add `admin_buttons` to `INSTALLED_APPS`:

```python
INSTALLED_APPS = [
    ...,
    "admin_buttons",
]
```

2. Mix our class in your `ModelAdmin`, and define a `admin_buttons_config`
   attribute:


```python
from admin_buttons.admin import AdminButtonsMixin
from django.contrib import admin
from django.db import models
from django.shortcuts import redirect


class SpecialModelAdmin[M: models.Model](AdminButtonsMixin, admin.ModelAdmin[M]):
    """
    ModelAdmin for models that do something special. Their special thing
    will be done upon the click of a button
    """

    admin_buttons_config = [
        {
            # the button html name
            "name": "_dosomethingspecial",

            # the method to be called when clicking the button
            "method": "do_something_special",

            # The button label
            "label": _("Do something very special"),

            # Optionally, define a condition. If it does not pass, the
            # button will not be displayed
            "condition": lambda request, context: (
                request.user.has_perm("someperm")
                and not re.search(r"add/?$", request.path)
            ),

            # Optionally, include extra html after the button
            "extra_html": mark_safe_lazy(
                '<input type="number" step=1 min=1 max=99 value=1 '
                'name="n_times" aria-label="'
                f'{_("Number of times do to something special")}">'
            ),

            # Optionally, use a separator before this button:
            use_separator: True,
        },
    ]

    # The chosen method works as a view. Therefore, it should return a response
    # To simply return to the change view, redirect to HTTP_REFERER, as below:
    def do_something_special(self, request: HttpRequest, obj: M | None):
        obj.something_special()
        return redirect(request.META["HTTP_REFERER"])

```

## Development

All contributions are welcome! To setup development:

1. `pip install -r dev.requirements.txt`
2. `pre-commit install`