MCP.so
Sign In
Servers

MCP Server Example for Indonesian Customs Tariff & Hascode API

@TehBotolBayu

Overview

What is MCP Server Example for Indonesian Customs Tariff & Hascode API?

An example implementation of a Model Context Protocol (MCP) server tailored for educational use in Indonesian customs tariff data and Hascode API integration. It demonstrates how to build a functional MCP server that connects to APIs like Hascode to fetch tariff and HS code information for AI models.

How to use MCP Server Example for Indonesian Customs Tariff & Hascode API?

Install Python 3.10+, MCP SDK 1.2.0+, and the uv package manager. Initialize a project with uv init mcp-server, set up a virtual environment, add dependencies (uv add "mcp[cli]" httpx), then create a main.py with a resource class (e.g., HsCodeTariffResource) that calls the Hascode API. Run the server with uv run main.py. Connect to Claude Desktop by editing its config file (claude_desktop_config.json) with the server’s absolute path.

Key features of MCP Server Example for Indonesian Customs Tariff & Hascode API

  • Educational MCP server for Indonesian customs tariff data
  • Integrates with Hascode API for real-time HS code lookups
  • Supports resources, tools, and prompts for LLM interaction
  • Built with Python, MCP SDK, and httpx
  • Connects to Claude Desktop via local MCP configuration
  • Uses uv for project management and dependency handling

Use cases of MCP Server Example for Indonesian Customs Tariff & Hascode API

  • Fetch current import duty rates for a given HS code in Indonesia
  • Provide structured tariff data to an AI assistant for customs queries
  • Demonstrate MCP integration with a public API for educational workshops
  • Build a prototype for logistics or trade compliance chatbots
  • Test LLM interaction with real-time customs API responses

FAQ from MCP Server Example for Indonesian Customs Tariff & Hascode API

What is MCP?

MCP (Model Context Protocol) is an open standard that provides structured context to Large Language Models, enabling standardized access to external data sources like customs tariff APIs.

What are the system requirements?

Python 3.10 or higher, MCP SDK 1.2.0 or higher, and the uv package manager.

How do I connect the server to Claude Desktop?

Edit the config file at ~/Library/Application Support/Claude/claude_desktop_config.json and add an mcpServers entry with your server’s absolute path, using uv as the command.

What does the server do?

It fetches Indonesian customs tariff data via the Hascode API and exposes it as an MCP resource, allowing an LLM to query HS code duty rates.

How can I troubleshoot if Claude Desktop doesn’t detect the server?

Check the config file path and syntax, use absolute paths, ensure uv is installed and working, and review Claude’s logs for connection errors.

Tags

More from Developer Tools