This MCP server provides access to the Australian Pharmaceutical Benefits Scheme (PBS) API, allowing AI models to retrieve information about medicines, pricing, and availability in Australia. It serves as a bridge between AI systems and Australia's pharmaceutical database.
To install the PBS MCP server:
Clone the repository:
git clone <repository-url>
cd pbs-mcp-standalone
Install dependencies:
npm install
Build the project:
npm run build
The server can be run in different modes:
This mode communicates via standard input/output streams:
npm start
Or use the provided script:
./start.sh
Start an HTTP server with Server-Sent Events support:
npm run start:http
Or specify a port:
./start.sh http 3000
The server can also be used as a command-line tool:
npm run cli -- <command>
Or:
./start.sh cli <command>
Example:
./start.sh cli info
The tool uses a subscription key for accessing the PBS API. To obtain your own key:
.env
file based on .env.example
with your key:
PBS_API_SUBSCRIPTION_KEY=your-actual-subscription-key
Note: The PBS Public API is rate-limited to one request per 20 seconds.
{
"endpoint": "prescribers",
"method": "GET",
"params": {
"get_latest_schedule_only": "true",
"limit": "20"
}
}
endpoint
(string, required): The PBS API endpoint to accessmethod
(string, optional): HTTP method (default: "GET")params
(object, optional): Query parameters for the requestsubscriptionKey
(string, optional): Custom subscription keytimeout
(number, optional): Request timeout in milliseconds (default: 30000){
"endpoint": ""
}
{
"endpoint": "prescribers",
"params": {
"get_latest_schedule_only": "true",
"limit": "10"
}
}
{
"endpoint": "item-overview",
"params": {
"get_latest_schedule_only": "true",
"limit": "5"
}
}
{
"endpoint": "prescribers",
"params": {
"pbs_code": "10001J",
"get_latest_schedule_only": "true"
}
}
The PBS MCP server offers several CLI commands:
./start.sh cli list-endpoints
./start.sh cli info
./start.sh cli prescribers [options]
Options:
-l, --limit <number>
: Results per page (default: 10)-p, --page <number>
: Page number (default: 1)-c, --pbs-code <code>
: Filter by PBS code-s, --schedule-code <code>
: Filter by schedule code-t, --prescriber-type <type>
: Filter by prescriber type-f, --fields <fields>
: Specific fields to return--latest
: Get only the latest schedule./start.sh cli item-overview [options]
Options:
-l, --limit <number>
: Results per page (default: 10)-p, --page <number>
: Page number (default: 1)-s, --schedule-code <code>
: Filter by schedule code-f, --fields <fields>
: Specific fields to return--latest
: Get only the latest schedule./start.sh cli query <endpoint> [options]
Options:
-m, --method <method>
: HTTP method (default: GET)-p, --params <json>
: Query parameters as JSON string-k, --subscription-key <key>
: Custom subscription key-t, --timeout <milliseconds>
: Request timeout./start.sh cli serve [options]
Options:
-p, --port <number>
: Port to listen on (default: 3000)When running in HTTP mode, these endpoints are available:
GET /health
: Server statusGET /tools
: List available toolsGET /sse
: Establish SSE connectionPOST /sse/:toolName
: Invoke tool via SSEPOST /api/:toolName
: Invoke tool via RESTThe PBS API provides several endpoints:
/
- API information and changelog/prescribers
- Information about prescribers/item-overview
- Detailed PBS item information/items
- Basic PBS item information/schedules
- PBS schedules information/atc-codes
- ATC classification codes/organisations
- Organisation information/restrictions
- Restriction information/parameters
- Parameter information/criteria
- Criteria information/copayments
- Copayment information/fees
- Fee information/markup-bands
- Markup band information/programs
- Program information/summary-of-changes
- Summary of changesThis server can be integrated with any MCP-compatible client:
{
"mcpServers": {
"pbs-api": {
"command": "node",
"args": ["path/to/pbs-mcp-standalone/build/index.js"],
"env": {
"PBS_API_SUBSCRIPTION_KEY": "your-subscription-key-here"
}
}
}
}
The server can interpret natural language prompts such as:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "pbs-api" '{"command":"node","args":["path/to/pbs-mcp-standalone/build/index.js"],"env":{"PBS_API_SUBSCRIPTION_KEY":"your-subscription-key-here"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"pbs-api": {
"command": "node",
"args": [
"path/to/pbs-mcp-standalone/build/index.js"
],
"env": {
"PBS_API_SUBSCRIPTION_KEY": "your-subscription-key-here"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"pbs-api": {
"command": "node",
"args": [
"path/to/pbs-mcp-standalone/build/index.js"
],
"env": {
"PBS_API_SUBSCRIPTION_KEY": "your-subscription-key-here"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect