Deployment steps
To use 12306-mcp locally or on the server, you need to follow the following process to deploy it:
- Clone the project code:
git clone https://github.com/Joooook/12306-mcp.git
- Go to the project directory and install the dependencies:
cd 12306-mcp
npm i
- Build project:
npm run build
- Start the server:
node ./build/index.js
Configuration
For integration into systems supported by the MCP protocol, you need to add relevant configuration items to the configuration file to specify server startup commands and parameters.
Usage
After successful deployment, the API interface can be invoked via HTTP requests. Mainly include:
- Ticket inquiry: get the ticket information of the specified date and line
- Trip Filter: Filter by time, fare or trip type
- Stopover Search: Get details of train stops.
This answer comes from the article12306-mcp: Train Ticket Inquiry Server based on MCP ProtocolThe