Get the FREE Ultimate OpenClaw Setup Guide →

mcp_server_safe_content_check

mcp_server,safe_content_check

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio liangjunyu2010-mcp_server_safe_content_check uv run --with mcp[cli] mcp run /PATH/mcp_server_safe_content_check/src/mcp_server_safe_content_check/server.py \
  --env BAIDU_CLOUD_ACCESS_KEY_ID="YOUR_ACCESS_KEY_ID" \
  --env BAIDU_CLOUD_SECRET_ACCESS_KEY="YOUR_SECRET_KEY"

How to use

This MCP server provides access to Baidu Cloud Content Safety for large models via the MCP (Model Context Protocol). It exposes an input_analyze tool that analyzes user input text for safety concerns using Baidu's content safety capabilities. To run it, install Python 3.10+, ensure uv (the MCP runner) is installed, clone the repository, and start the server using uv. You can configure the server with your Baidu Cloud credentials via environment variables or a .env file. The server is designed to be consumed by MCP-enabled applications such as Cursor or any MCP-compliant client, enabling seamless content safety checks as part of your model workflow.

How to install

Prerequisites:

  • Python 3.10 or newer
  • uv (MCP runner) installed: pip install uv

Installation steps:

  1. Clone the repository git clone https://github.com/liangjunyu2010/mcp_server_safe_content_check.git cd mcp_server_safe_content_check

  2. Install dependencies (if any are listed in a requirements file; otherwise uv is the primary runtime dependency)

    If a virtual environment is preferred:

    python -m venv venv source venv/bin/activate # on Windows: venv\Scripts\activate pip install -r requirements.txt # if available

  3. Prepare credentials

    • Set environment variables when starting the server or via a .env file: BAIDU_CLOUD_ACCESS_KEY_ID=YOUR_ACCESS_KEY_ID BAIDU_CLOUD_SECRET_ACCESS_KEY=YOUR_SECRET_KEY
  4. Run the server

    • Using uv directly as recommended in the repository: uv run src/mcp_server_safe_content_check/server.py
  5. (Optional) Run with explicit credentials on the command line: uv run src/mcp_server_safe_content_check/server.py --BAIDU_CLOUD_ACCESS_KEY_ID YOUR_ACCESS_KEY_ID --BAIDU_CLOUD_SECRET_ACCESS_KEY YOUR_SECRET_KEY

Notes:

  • If you prefer Cursor or another MCP client, configure the MCP server entry with the appropriate command/args as shown in the README. Ensure the environment variables are available to the runtime.
  • You can also place credentials in a local .env file and rely on uv's environment-loading behavior if supported in your setup.

Additional notes

Tips and common issues:

  • Ensure Python 3.10+ is installed and accessible in your PATH.
  • If using a virtual environment, activate it before running uv.
  • When configuring via Cursor, use the provided mcp.json snippet to register the MCP server with command 'uv' and the given arguments.
  • If you encounter authentication errors, verify that BAIDU_CLOUD_ACCESS_KEY_ID and BAIDU_CLOUD_SECRET_ACCESS_KEY are correct and have the necessary permissions.
  • The server expects the Baidu Cloud credentials to be available as environment variables; you can also export them in your shell or place them in a .env file read by uv/CICD pipelines.
  • The input_analyze tool accepts a single parameter: text (the content to analyze). You can extend or customize the MCP config to expose additional tools if supported by the server.
  • When integrating with Cursor, you may need to restart Cursor after adding the new MCP server configuration to reload the mcp.json.

Related MCP Servers

Sponsor this space

Reach thousands of developers