- Home
- MCP servers
- edistrict_odisha
edistrict_odisha
- 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-edistrict-odisha-serviceplus-odisha": {
"command": "python",
"args": [
"mcp_server/main.py",
"stdio"
],
"env": {
"CONFIG": "A JSON string containing the configuration",
"SECURITY": "Environment variables for security parameters (e.g., API keys)",
"CONFIG_PATH": "Path to a JSON configuration file (e.g., mcp_server/mcp_config.json)"
}
}
}
}You run an MCP (Model Context Protocol) Server to expose a defined OpenAPI-based interface for a specific data domain. This server lets you connect an MCP client to your Python-based backend, enabling standardized requests, context handling, and strict contract enforcement for the edistrict Odisha service bundle.
How to use
You will start the MCP server in stdio mode from your local environment and then connect an MCP client to it. The server exposes the OpenAPI-described interface for the edistrict Odisha service and supports multiple transport modes. Use the stdio flow for local development and testing.
How to install
Prerequisites: Python 3.9 or newer. Ensure you have Python’s package manager available and the uv tool installed.
Step 1: Clone the project repository and navigate into the project folder.
git clone <repository-url>
cd mcp-server
Install dependencies
Install development dependencies so you can run and test the MCP server locally.
pip install -e ".[dev]"
Alternative: use uv to install editable dependencies
If you prefer to use uv for the editable installation, run the following command.
uv pip install --editable ".[dev]"
Run the MCP server in stdio mode
Start the server using Python and run it in stdio mode. This starts the MCP server so you can connect clients directly from your development environment.
python mcp_server/main.py stdio
Configuration and environment variables
Configure runtime parameters via environment variables or a JSON configuration. The following variables are supported by default:
CONFIG_PATH=/path/to/mcp_config.json
CONFIG='{"server":"edistrict_odisha"}'
SECURITY="{\"apiKey\": \"YOUR_API_KEY\"}"
Notes on starting and testing
For development, you can start with the stdio flow as shown above and then verify behavior by running a local MCP client against the running process. If you need to test programmatically, you can import the server module and exercise the same start sequence within test scripts.
Additional configuration details
You can specify the configuration path or inline JSON for the MCP server, and security-related environment variables to protect your endpoints. Review the main entry point to understand how these are loaded and applied at startup.
Available tools
ruff
Linting and formatting tool used to keep code clean and consistent.
mypy
Static type checker to catch type errors early.
pytest
Testing framework used to run unit and integration tests.
pre-commit
Automation to run checks before commits, ensuring code quality.
hatch
Build and publish workflow for the MCP server package.