bill4time-mcp

bill4time-mcp

MCP server for Bill4Time providing API coverage for legal billing and time tracking, enabling natural language interaction with clients, projects, time entries, invoices, payments, and more from Claude Desktop.

Category
访问服务器

README

bill4time-mcp

PyPI version Python 3.10+ License: MIT

MCP server for Bill4Time — API coverage for legal billing and time tracking. Use Bill4Time from Claude Desktop with natural language.

What you can do

  • Clients — list, filter by status, search active/disabled
  • Projects — list, filter by client, status, billing method
  • Time Entries — list by client, project, user, invoice, date range, billing status
  • Expenses — list by client, project, invoice, date range
  • Invoices — list by status (prebill/finalized), paid status, client, project, date range
  • Payments — list by client, project, date range
  • Payments Applied — track payment-to-invoice applications
  • Users — list and look up users
  • Contacts — list by status, date range, contact connections
  • Trust Accounting — list trust records by client, project, date range

All resources support OData-style filtering via filter_expr parameter for advanced queries.

Requirements

  • Python 3.10+
  • Claude Desktop (or any MCP-compatible client)
  • Bill4Time API key (create in Settings → API tab)

Note: The Bill4Time API is currently read-only. All tools retrieve data only.

Installation

pip install bill4time-mcp

Setup

bill4time-mcp-setup

This prompts for your API key and tests the connection.

Verify:

bill4time-mcp-verify

Credential storage

By default the API key is stored in your operating system's native secret store via the cross-platform keyring library:

OS Backend
macOS Keychain
Windows Credential Manager
Linux Secret Service (GNOME Keyring / KWallet)

The secret is saved under the service name bill4time-mcp. Nothing is written to disk in clear text.

File fallback. On a host with no keyring backend (e.g. a headless Linux box without Secret Service), or if you set BILL4TIME_MCP_USE_KEYRING=0, the key falls back to a ~/.bill4time-mcp/.env file with 0600 permissions.

Read order. The key resolves in the order OS keyring → process environment → .env file. So a rotated key in the keyring always wins, and a BILL4TIME_API_KEY exported in your shell overrides the file fallback without touching the keyring.

Pluggable backend. keyring lets you point at any secret store. For example, install keyrings.cryptfile for an encrypted file backend, or a cloud backend, then select it with the standard PYTHON_KEYRING_BACKEND environment variable or a keyringrc.cfg. See the keyring configuration docs.

Claude Desktop Configuration

{
  "mcpServers": {
    "bill4time": {
      "command": "bill4time-mcp"
    }
  }
}

Authentication Notes

Bill4Time uses an API key embedded directly in the URL path:

https://secure.bill4time.com/b4t-api/{api_key}/v1/{resource}

No OAuth or token refresh required. Create API keys from Settings → API in your Bill4Time account.

OData Filtering

All list_* tools accept a filter_expr parameter for advanced filtering:

"status eq 'Active'"
"clientId eq 751"
"invoiceDate ge '2024-01-01' AND invoiceDate le '2024-12-31'"
"billingStatus eq 'Ready For Billing'"

Supported operators: eq, ne, gt, ge, lt, le

Use top to limit results, orderby to sort, skip for pagination.

Example usage in Claude

"Show all unpaid invoices"

"List time entries for project 456 this month"

"Get all payments received from client 123 in 2024"

"Show trust account activity for client 789"

"List open projects ordered by project name"

Security note

API key in URL path. Bill4Time's API design embeds the API key directly as a path segment in every request URL (/b4t-api/{api_key}/v1/...). This is a Bill4Time API architecture constraint — the MCP loads your key from a local env file and never commits it to this repository. However, the key-in-URL design has the following implications you should be aware of:

  • Server/proxy access logs on any machine between your client and Bill4Time's servers will record the full request URL, including the API key, for the duration of their log retention policy.
  • Network monitoring tools that capture request URLs (e.g. HTTP proxies, security appliances, debugging tools) will expose the key in logged URLs.
  • If your key is compromised, all API access to your Bill4Time account — billing data, client records, invoices, payments — is accessible until the key is rotated.

Recommended practices:

  1. Rotate your API key periodically (quarterly at minimum) from Settings → API in your Bill4Time account.
  2. Keep access logs on this machine private — ensure ~/.bill4time-mcp/ is not world-readable, and that any HTTP proxy or network capture tool running on this machine is restricted to authorised users.
  3. Rotate immediately if you suspect the key has been exposed (e.g. via a shared log file, a network trace, or an accidental curl -v paste).
  4. Use least-privilege — if Bill4Time offers read-only API keys in the future, prefer those for this MCP (all current tools are read-only).

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选