- Home
- MCP servers
- LexGuard
LexGuard
- python
0
GitHub Stars
python
Language
5 months ago
First Indexed
2 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.
LexGuard MCP provides quick, AI-assisted access to official Korean law data. You can ask questions in natural language and receive legally grounded sources such as statutes, interpretations, and precedents, helping you understand and find relevant legal foundations without needing to search manually.
How to use
You interact with LexGuard MCP through an MCP client. The server can be accessed over HTTP via a remote MCP URL or run locally as a stdio server. Ask clear questions about laws, rules, or procedures and the MCP will route your query to the appropriate tools to fetch relevant statutes, interpretations, or decisions. You can start with broad questions to get a sense of applicable laws, then drill down to specific articles or excerpts.
How to install
Prerequisites: ensure you have Python and pip installed on your system.
-
Set up a Python environment (optional but recommended).
-
Install dependencies
pip install -r requirements.txt
-
Prepare API key (optional but recommended). If you have an API key from the official law data provider, copy it into the environment configuration. If you do not have a key, you can still run some features but with limited functionality.
-
Create environment configuration
LAW_API_KEY=your_api_key_here # optional
LOG_LEVEL=INFO
PORT=8099
- Run the server locally
python -m uvicorn src.main:api --host 0.0.0.0 --port 8099
# or
python -m src.main
If the port is in use, start on a different port and adjust the URL accordingly.
PORT=8100 python -m uvicorn src.main:api --host 0.0.0.0 --port 8100
Health check example:
curl http://localhost:8099/health
Additional sections
Configuration and deployment details include both a remote MCP URL and a local stdio setup for running the MCP server. The remote endpoint is used when you want to connect to a hosted MCP server, while the local setup runs the MCP server on your machine using Python.
Security notes: do not commit environment configuration files containing API keys. Keep them secret and use a real key only in secured environments.
Examples of typical usage include asking for a specific law provision, finding related interpretations, or locating relevant court decisions. You can combine searches, interpretations, and outcomes to build a clear legal basis for your question.
Troubleshooting tips: if you encounter port conflicts, stop the existing process using its PID or run the server on an alternate port. For API key related issues, verify that LAW_API_KEY is correctly set in the environment and that the key has access to the required data sources.
Available tools
smart_search_tool
Integrated search across laws, precedents, and interpretations to quickly determine relevance and fetch applicable legal sources.
situation_guidance_tool
Provides situation-based guidance by analyzing your context and offering relevant legal information and next steps.
search_law_tool
Search laws by name or keyword to identify applicable statutes and legal rules.
get_law_tool
Retrieve full details of a specific law, including sections and articles.
search_precedent_tool
Search for precedents or case law related to your query.
get_precedent_tool
Provide detailed information about a specific precedent or ruling.
search_law_interpretation_tool
Find official interpretations or official government explanations of a law.
get_law_interpretation_tool
Show detailed official interpretation of a specific law.
search_administrative_appeal_tool
Search for administrative appeal cases and decisions.
get_administrative_appeal_tool
Show detailed administrative appeal decision information.
search_committee_decision_tool
Search for committee decisions and rulings.
get_committee_decision_tool
Show detailed committee decision information.
search_constitutional_decision_tool
Search for constitutional court decisions.
get_constitutional_decision_tool
Show detailed constitutional court decision information.
search_special_administrative_appeal_tool
Search for special administrative appeals and related decisions.
get_special_administrative_appeal_tool
Show detailed special administrative appeal information.
compare_laws_tool
Compare current law with past versions to identify changes and evolutions.
search_local_ordinance_tool
Search for local ordinances and regulations from municipalities.
search_administrative_rule_tool
Search for internal administrative rules and guidelines.
health
Check the current health/status of the MCP service.