utilities
Calculate business days between dates, excluding weekends and holidays
While you can view all details here, using this MCP server's API requires a Enterprise subscription. API calls with FREE plan keys will return an access error.
View Pricing PlansAdd a specified number of business days to a starting date, automatically skipping weekends.
Calculate the number of business days between two dates, excluding weekends. Optionally exclude country-specific holidays.
Check if a specific date is a business day (not a weekend or holiday).
Add the Business Days Calculator MCP server to your MCP client configuration:
{
"mcpServers": {
"business-days-calculator": {
"command": "curl",
"args": [
"-X", "POST",
"https://apistack.online/api/mcp/utilities/business-days-calculator/sse",
"-H", "Content-Type: application/json",
"-H", "Authorization: Bearer YOUR_API_KEY",
"--data-raw", "@-"
],
"transport": "sse"
}
}
}
Replace YOUR_API_KEY with your APIStack API key from the Dashboard.
// Calculate business days between two dates
const result = await mcpClient.callTool('calculate_business_days', {
start_date: '2024-01-01',
end_date: '2024-01-31',
exclude_holidays: true,
country: 'US'
});
// Add 10 business days to a starting date
const result = await mcpClient.callTool('add_business_days', {
start_date: '2024-01-15',
business_days: 10,
country: 'US'
});
// Check if a specific date is a business day
const result = await mcpClient.callTool('is_business_day', {
date: '2024-01-15',
country: 'US'
});
// Business Days Calculator MCP Client Example
const response = await fetch('https://apistack.online/api/mcp/utilities/business-days-calculator/sse', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 'req-1',
method: 'tools/call',
params: {
name: 'calculate_business_days',
arguments: {
start_date: '2024-01-01',
end_date: '2024-01-31',
exclude_holidays: true,
country: 'US'
}
}
})
});
const result = await response.json();
console.log(result);
# Business Days Calculator MCP Client Example
import requests
response = requests.post(
'https://apistack.online/api/mcp/utilities/business-days-calculator/sse',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
json={
'jsonrpc': '2.0',
'id': 'req-1',
'method': 'tools/call',
'params': {
'name': 'calculate_business_days',
'arguments': {
'start_date': '2024-01-01',
'end_date': '2024-01-31',
'exclude_holidays': True,
'country': 'US'
}
}
}
)
result = response.json()
print(result)
# Business Days Calculator MCP Client Example
curl -X POST https://apistack.online/api/mcp/utilities/business-days-calculator/sse \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": "req-1",
"method": "tools/call",
"params": {
"name": "calculate_business_days",
"arguments": {
"start_date": "2024-01-01",
"end_date": "2024-01-31",
"exclude_holidays": true,
"country": "US"
}
}
}'
// Add 10 business days to January 15, 2024
const response = await fetch('https://apistack.online/api/mcp/utilities/business-days-calculator/sse', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 'req-2',
method: 'tools/call',
params: {
name: 'add_business_days',
arguments: {
start_date: '2024-01-15',
business_days: 10,
country: 'US'
}
}
})
});
const result = await response.json();
console.log(result); // Returns the date 10 business days later
Add this configuration to your MCP client:
Note: Replace "YOUR_API_KEY" with a valid Enterprise API key. FREE plan keys will receive access errors.
{
"mcpServers": {
"business-days-calculator-utilities": {
"command": "curl",
"args": [
"-X",
"POST",
"https://apistack.online/api/mcp/utilities/business-days-calculator/sse",
"-H",
"Content-Type: application/json",
"-H",
"Authorization: Bearer YOUR_API_KEY",
"--data-raw",
"@-"
],
"transport": "sse"
}
}
}Use the MCP configuration above in your AI client, or test the underlying APIs in our playground.
API playground requires a Enterprise subscription for access.