How do I connect an AI assistant to government travel rates?
Connect an MCP-compatible assistant to the Allowances API MCP server at https://mcp.allowancesapi.com/mcp, configure your API key in the X-API-Key header, and ask it to retrieve rates for a named location and date. The assistant can use tools to query GSA, DTMO, and DSSR data rather than relying on remembered rate figures.
MCP, the Model Context Protocol, lets an assistant discover and call external tools. You need a client that supports remote Streamable HTTP MCP servers and custom authentication headers. Simply pasting the endpoint into a conversation does not configure a connection.
1. Get an API key and choose a client
Create an account through the Allowances API registration page, then obtain your key from your account. MCP tool calls use the same key, subscription access, and quotas as REST requests. Initialization and tool discovery do not require a key; retrieving rates does.
The free Sandbox supports getting started with current rates. Historical requests require the appropriate plan; see pricing for current access limits.
The MCP setup guide provides configuration for supported clients, including Claude Code, Cursor, and VS Code. The example below uses Claude Code.
2. Configure the connection
For a project-based Claude Code setup, add this entry to .mcp.json at your project root. If that file already contains servers, add the allowances entry without replacing them:
{
"mcpServers": {
"allowances": {
"type": "http",
"url": "https://mcp.allowancesapi.com/mcp",
"headers": {
"X-API-Key": "${ALLOWANCES_API_KEY}"
}
}
}
}
Set ALLOWANCES_API_KEY in the environment used to launch Claude Code. Keep the actual key out of shared configuration, prompts, screenshots, and source control. Start a session in the project, approve the server when prompted, and use /mcp to inspect its connection status.
This configuration uses Claude Code's environment-variable expansion. Other clients use different configuration formats; copy their example from the setup guide rather than assuming this file works unchanged. Anthropic documents project configuration and HTTP connections in its Claude Code MCP reference.
3. Ask for a specific source, location, and date
Start with a current-rate lookup:
Use the Allowances API tools to retrieve the current GSA per diem for San Diego, California. Report lodging and meals and incidental expenses separately. Include the location returned, the effective date, and any seasonal periods. Do not substitute a remembered rate if the tool fails.
For an overseas assignment:
Retrieve the current DSSR COLA and hardship rates for Nairobi, Kenya. Show the effective date for each allowance and any available official verification link. Keep the rate lookup separate from any employee payment calculation.
For a historical request on a plan that supports it:
Retrieve DTMO per diem for Adelaide, Australia, as of July 15, 2026. Include the source, location, effective date, lodging, meals, incidentals, and relevant footnotes. Explain if no matching result is available.
Specify DTMO or DSSR for overseas per diem when your workflow requires one of them. A destination can exist in both datasets, and the assistant should not choose solely on the city name.
4. Verify the first tool result
Inspect the tool call and response in your client. Confirm that a tool actually ran, the location and source match your question, and the date is supported by your plan. Compare the answer with the structured response and an official source link where available.
Ask the assistant to preserve distinctions between the requested date and published effective dates, daily amounts and percentages, and missing data and zero values. Do not treat a COLA percentage as an automatic percentage of salary.
Allowances API normalizes published government data and is not affiliated with a government agency. The assistant can retrieve rate inputs, but your travel policy and applicable instructions determine how those inputs are used.
Troubleshooting the connection
| Symptom | What to check |
|---|---|
| Tools appear, but rate calls fail authentication | Confirm the key is valid and the launched client can read the environment variable. Discovery does not prove authentication works. |
| The client cannot connect | Use the MCP endpoint above, verify Streamable HTTP support, and check network access. The website and REST base URL are different endpoints. |
| A historical lookup is rejected | Check the requested date and your plan's historical access. |
| Requests reach a quota or rate limit | Reduce repeated calls and follow the returned limit information. |
| No matching location is returned | Use location search tools and confirm the country, source, and post name before retrying. |
| The assistant answers without a tool call | Ask explicitly for an Allowances API lookup and inspect the tool activity before relying on the number. |
Build a repeatable workflow
Save useful prompts with their required source, date, and output fields. Keep the returned evidence with any downstream calculation so another reviewer can reproduce the lookup. For automated software workflows, the REST API reference provides the underlying endpoints.
For a concrete estimating use case, continue with automating overseas allowances for contractor proposals.