MCP Server generated by mcp.ag2.ai
Configuration
View docs{
"mcpServers": {
"huazhengwang-exa-search-api": {
"command": "python",
"args": [
"mcp_server/main.py",
"stdio"
],
"env": {
"CONFIG": "{\"example_key\":\"example_value\"}",
"SECURITY": "API_KEY=YOUR_API_KEY",
"CONFIG_PATH": "path/to/mcp_config.json"
}
}
}
}You run an MCP Server to connect an MCP client to a Python-based server that processes multi-agent conversations. This guide shows you how to install the server, start it in stdio mode, and configure it for secure operation so you can run and test your MCP-enabled client workflows.
Start the MCP server in stdio mode to run locally and interact with an MCP client. Use a client to send requests to the server and receive coordinated responses from multiple agents. Configure the server via environment variables to point to a configuration file or JSON string and to set security parameters as needed.
Prerequisites you need before installation are Python 3.9 or later, Python’s package manager (pip), and the uv tool for optional editable installs.
Step 1: Install the package in editable mode with development dependencies.
pip install -e ".[dev]"You can also install dependencies using uv for an editable setup.
uv pip install --editable ".[dev]"Run the MCP server in stdio mode using the Python entry point. This starts the local server ready to accept MCP client connections.
python mcp_server/main.py stdioConfigure runtime behavior and security through environment variables. You can provide a JSON configuration string or a path to a configuration file, along with security parameters such as API keys.
Environment variables commonly used:
- CONFIG_PATH: Path to a JSON configuration file (for example, mcp_server/mcp_config.json)
- CONFIG: A JSON string containing the configuration
- SECURITY: Environment variables for security parameters (such as API keys)
The server’s behavior is defined in the main entry point. You can test programmatic interactions by starting the server and using an MCP client to issue requests, ensuring your client is compatible with the server’s MCP interface.
This MCP server is built to work with a defined OpenAPI-based interface and supports local development workflows using Python tooling. You can tailor the configuration to your deployment needs, and you can run quick sanity checks with the provided tooling to ensure your environment is correctly set up before you connect a client.
Lints and formats the Python code to ensure consistency and quality.
Performs static type checking to catch type errors before runtime.
Runs unit tests to verify functionality and regressions.
Automates pre-commit checks to enforce coding standards before commits.
Builds and publishes the MCP project.
A lightweight tool used for editable installs and various development commands.