Skip to main content

MCP server for retrieving issues from law_recognition

Project description

Project description

Identification and standardization of regulations and legal provisions. Use this tool when you need to:

  • Extract from the text paragraph: regulatory name and provisions
  • The extracted regulations and laws correspond to the names of standard regulations and the number of clauses in the regulatory database

Requirements

  • requires-python = ">=3.10"
  • mcp>=1.0.0

Installation

  • pip install mcp_server_law_recognition

Usage

Sample

from mcp import ClientSession, StdioServerParameters, types
from mcp.client.stdio import stdio_client
server_params = StdioServerParameters(
    command="python",  # Executable
    args=["-m","mcp_server_law_recognition"],  # Optional command line arguments
    env={
        "pkulaw_api_key": "da9629867ee841518***********"
    }  # Optional environment variables
) 
 
async def run():
    async with stdio_client(server_params) as (read, write):
        async with ClientSession(
            read, write
        ) as session:
            # Initialize the connection
            await session.initialize()

        tools = await session.list_tools()
        print('tools:',tools)
        result = await session.call_tool("get_law_recognition", arguments={"text": "根据《民法典》第一千二百六十条规定,该法自2021年1月1日起施行,同时废止了《中华人民共和国婚姻法》、《中华人民共和国继承法》、《中华人民共和国民法通则》..."})
        print('result:',result)

if __name__ == "__main__":
    import asyncio

    asyncio.run(run())

Contact US

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_law_recognition-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_law_recognition-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_law_recognition-0.1.0.tar.gz.

File metadata

File hashes

Hashes for mcp_server_law_recognition-0.1.0.tar.gz
Algorithm Hash digest
SHA256 40bd0169f779fd5e4c464e790254824e3d2a8b00c3ec1074eb4b584c565a2497
MD5 64fa23059f4b6b3fdfaa59e9cafd9fb0
BLAKE2b-256 02d8f956ea41de7887c61a5b72fb1dcbaaa165b7b6772ab957dc578dd54c816b

See more details on using hashes here.

File details

Details for the file mcp_server_law_recognition-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_law_recognition-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f1071ffc172cf07aac7e2b3f36895a70987857f2b60c40f84cf752e659e3508
MD5 ec5a7acbbf34edc7b0dee53ebd013e8c
BLAKE2b-256 e261a5ab2ca6c0431f9ac60cc2198e6ae22152a0d054ff7ed370119fada31944

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page