Skip to main content
Glama
main.py871 B
import os import requests from mcp.server.fastmcp import FastMCP mcp = FastMCP() t_key = os.getenv("SWEETTRACKER_API_KEY") @mcp.tool() def get_company_list(): """ Get Company List """ try: response = requests.get("https://info.sweettracker.co.kr/api/v1/companylist", params = {"t_key": t_key}) return response.json() except Exception as e: return {"error": str(e)} @mcp.tool() def track_shipping(company_code: str, tracking_invoice: str): """ Track Shipping with Company Code and Tracking Invoice """ try: response = requests.post("https://info.sweettracker.co.kr/api/v1/trackingInfo", params = {"t_key": t_key, "t_code": company_code, "t_invoice": tracking_invoice}) return response.json() except Exception as e: return {"error": str(e)} if __name__ == "__main__": mcp.run()

Implementation Reference

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gws8820/ShippingTracker'

If you have feedback or need assistance with the MCP directory API, please join our Discord server