- Home
- MCP servers
- BC Catalogue
BC Catalogue
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ag2-mcp-servers-bc-data-catalogue-api": {
"command": "python",
"args": [
"mcp_server/main.py",
"stdio"
],
"env": {
"CONFIG": "{\"transport\":\"stdio\"}",
"SECURITY": "YOUR_API_KEY",
"CONFIG_PATH": "path/to/mcp_config.json"
}
}
}
}You run a Python-based MCP Server that connects to a defined API source to expose Model Context Protocol services. It lets MCP clients interact with the GOV BC Catalogue data through a configurable, local or remote server, enabling structured context-aware queries and actions across your environment.
How to use
Start the MCP server in stdio mode to enable in-process communication with your MCP client. The server reads its configuration from environment or a JSON file and exposes endpoints for clients to request model-context operations.
Typical usage patterns include starting the server with a prepared configuration, then connecting your MCP client to the standard input/output stream and issuing requests as your workflow requires. You can also switch transport modes later if your client supports them (e.g., sse or streamable-http) by restarting with the desired mode.
How to install
Prerequisites: Python 3.9 or newer, and a working Python package manager (pip) plus an HTTP server library for development (uv is commonly used for local development).
Step 1: Clone the repository and navigate into the project directory.
git clone <repository-url>
cd mcp-server
Step 2: Install development dependencies. Use the editable install to reflect code changes without rebuilding.
pip install -e ".[dev]"
If you prefer to use uv for a lighter setup, install the editable package similarly via uv.
uv pip install --editable ".[dev]"
Step 3: Run the MCP server in stdio mode to start interacting with clients.
python mcp_server/main.py stdio
Additional sections
Configuration and runtime behavior are driven by environment variables. You can specify a path to a JSON configuration file or pass a JSON string directly, and you can set security parameters as needed.
Environment variables you may use include CONFIG_PATH for the JSON file path, CONFIG for a JSON string containing the configuration, and SECURITY for security-related settings such as API keys. The startup script loads these values in its main block to configure the server at runtime.
Build and publishing steps for development are supported by a build system. Use the provided commands to build and publish when you are ready to release a new version.
Available tools
lint
Linting and formatting checks performed with ruff to ensure code quality and consistency.
format
Code formatting performed with ruff format to maintain style across the codebase.
static-analysis
Static analysis checks (mypy, bandit, semgrep) to catch type and security issues early.
tests
Automated tests run with pytest, with coverage reports to measure test completeness.
pre-commit
Pre-commit hooks enforce code quality before every commit.