loading…
Search for a command to run...
loading…
Provides AI agents and LLMs with secure access to the ICON MCP v103 API via Bearer tokens or HTTP 402 payment protocols. It enables standardized interaction wit
Provides AI agents and LLMs with secure access to the ICON MCP v103 API via Bearer tokens or HTTP 402 payment protocols. It enables standardized interaction with market data and API endpoints through the Model Context Protocol.
This is an MCP (Model Context Protocol) server that provides with authentication via Bearer tokens access to the ICON MCP v103 API. It enables AI agents and LLMs to interact with ICON MCP v103 through standardized tools.
This server provides the following tools:
example_tool: Placeholder tool (to be implemented)Note: Replace example_tool with actual ICON MCP v103 API tools based on the documentation.
Clone this repository:
git clone https://github.com/Traia-IO/icon-mcp-v103-mcp-server.git
cd icon-mcp-v103-mcp-server
Set your API key:
export ICON_MCP_V103_API_KEY="your-api-key-here"
Run with Docker:
./run_local_docker.sh
.env file with your configuration:
ICON_MCP_V103_API_KEY=your-api-key-here
SERVER_ADDRESS=0x1234567890123456789012345678901234567890
MCP_OPERATOR_PRIVATE_KEY=0x1234567890abcdef... MCP_OPERATOR_ADDRESS=0x9876543210fedcba...
D402_TESTING_MODE=false PORT=8000
2. Start the server:
```bash
docker-compose up
Install dependencies using uv:
uv pip install -e .
Run the server:
ICON_MCP_V103_API_KEY="your-api-key-here" uv run python -m server
## Usage
### Health Check
Test if the server is running:
```bash
python mcp_health_check.py
from traia_iatp.mcp.traia_mcp_adapter import create_mcp_adapter_with_auth
# Connect with authentication
with create_mcp_adapter_with_auth(
url="http://localhost:8000/mcp/",
api_key="your-api-key"
) as tools:
# Use the tools
for tool in tools:
print(f"Available tool: {tool.name}")
# Example usage
result = await tool.example_tool(query="test")
print(result)
This server supports two modes of operation:
Clients with their own ICON MCP v103 API key can use the server for free:
# Request with client's API key
curl -X POST http://localhost:8000/mcp \
-H "Authorization: Bearer CLIENT_ICON_MCP_V103_API_KEY" \
-H "Content-Type: application/json" \
-d '{"method":"tools/call","params":{"name":"example_tool","arguments":{"query":"test"}}}'
Flow:
Clients without an API key can pay-per-use via HTTP 402 protocol:
# Request with payment proof (x402/d402 protocol)
curl -X POST http://localhost:8000/mcp \
-H "X-PAYMENT: <base64_encoded_x402_payment>" \
-H "Content-Type: application/json" \
-d '{"method":"tools/call","params":{"name":"example_tool","arguments":{"query":"test"}}}'
Flow:
This server uses the traia_iatp.d402 module for payment verification:
DEFAULT_PRICE_USD)# Required
ICON_MCP_V103_API_KEY=your_internal_icon-mcp-v103_api_key # Server's API key (for payment mode)
SERVER_ADDRESS=0x1234567890123456789012345678901234567890 # Server's payment address
# Required for Settlement (Production)
MCP_OPERATOR_PRIVATE_KEY=0x1234... # Private key for signing settlement attestations
MCP_OPERATOR_ADDRESS=0x5678... # Operator's public address (for verification)
# Optional
D402_FACILITATOR_URL=https://facilitator.d402.net # Facilitator service URL
D402_FACILITATOR_API_KEY=your_key # For private facilitator
D402_TESTING_MODE=false # Set to 'true' for local testing without settlement
Operator Keys:
Note on Per-Endpoint Configuration: Each endpoint's payment requirements (token address, network, price) are embedded in the tool code. They come from the endpoint configuration when the server is generated.
Client Decision:
Server Response:
Business Model:
python mcp_health_check.pyTo add new tools, edit server.py and:
@mcp.tool() decorated functionsdeployment_params.json with the tool names in the capabilities arrayThe deployment_params.json file contains the deployment configuration for this MCP server:
{
"github_url": "https://github.com/Traia-IO/icon-mcp-v103-mcp-server",
"mcp_server": {
"name": "icon-mcp-v103-mcp",
"description": "V103 server for icon_url",
"server_type": "streamable-http",
"requires_api_key": true,
"api_key_header": "Authorization",
"capabilities": [
// List all implemented tool names here
"example_tool"
]
},
"deployment_method": "cloud_run",
"gcp_project_id": "traia-mcp-servers",
"gcp_region": "us-central1",
"tags": ["icon mcp v103", "api"],
"ref": "main"
}
Important: Always update the capabilities array when you add or remove tools!
This server is designed to be deployed on Google Cloud Run. The deployment will:
/mcp endpoint for client connectionsPORT: Server port (default: 8000)STAGE: Environment stage (default: MAINNET, options: MAINNET, TESTNET)LOG_LEVEL: Logging level (default: INFO)ICON_MCP_V103_API_KEY: Your ICON MCP v103 API key (required)docker logs <container-id>Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"icon-mcp-v103": {
"command": "npx",
"args": []
}
}
}