home / mcp / times news mcp server
MCP Server generated by mcp.ag2.ai
Configuration
View docs{
"mcpServers": {
"ag2-mcp-servers-times-newswire-api": {
"command": "python",
"args": [
"mcp_server/main.py",
"stdio"
],
"env": {
"CONFIG": "{\"transport\":\"stdio\"}",
"SECURITY": "{\"apiKey\":\"YOUR_API_KEY\"}",
"CONFIG_PATH": "mcp_server/mcp_config.json"
}
}
}
}This MCP server provides a streamlined way to expose the Times Newswire API through the Model Context Protocol, allowing clients to interact with the data via MCP transports such as stdio, SSE, or streamable HTTP. It is designed to be run locally or in a development environment, with flexible configuration through environment variables or a JSON config file.
You run the MCP server locally and connect an MCP client to its supported transport. Start the server in stdio mode to enable in-process communication with other tools, test suites, or development workflows. The server accepts configuration from environment variables or a JSON file, so you can tailor access, endpoints, and security to your environment.
Prerequisites you need before installing: Python 3.9 or newer, and pip (included with Python) to install dependencies.
Step 1: Prepare your environment. Ensure Python 3.9+ is available in your shell.
Step 2: Install dependencies. The project uses a development setup that can install in editable mode. Run the following command to install the dependencies needed for development and testing.
pip install -e ".[dev]"If you prefer to use uv for local testing, you can install dependencies in editable mode via uv as shown.
uv pip install --editable ".[dev]"To run the MCP server in stdio mode, execute the following command from your shell.
python mcp_server/main.py stdioConfigure runtime behavior using environment variables. You can provide a JSON config string or a path to a JSON config file.
export CONFIG_PATH=mcp_server/mcp_config.json
export CONFIG='{"transport":"stdio"}'
export SECURITY='{"apiKey":"YOUR_API_KEY"}'The main script loads configuration via the __main__ block in the server, reading either CONFIG_PATH or CONFIG and applying any SECURITY parameters.
Lints and formats the Python code to ensure consistent style and catch potential issues.
Performs static type checking to catch type errors before runtime.
Runs unit tests to verify functionality and regressions.
Builds and publishes the MCP server package, including project configuration.
Runs a suite of checks before each commit to maintain code quality.