Skip to content

Claude Code

Use provider tools directly in your terminal. Claude Code integration gives you:

  • Agent persona — A Famasi provider specialist that knows your context
  • Slash command/famasi-link-provider to link accounts
  • MCP server — Direct connection to https://mcp.famasi.ai/mcp

Install

Terminal window
npx @famasi/agents@latest install claude-code

Files created

.mcp.json # MCP server config
.claude/
agents/
famasi-provider.md # Agent instructions
commands/
famasi-link-provider.md # Link command

Configuration

The installer creates a .mcp.json with a URL-based MCP connection:

{
"mcpServers": {
"famasi-provider": {
"url": "https://mcp.famasi.ai/mcp"
}
}
}

Authenticate

Terminal window
npx @famasi/agents@latest link provider --provider-id YOUR_PROVIDER_ID

Or set the environment variable:

Terminal window
export FAMASI_PROVIDER_API_KEY=pk_live_...

Full authentication details →

Usage

Once linked, use natural language:

"Search the formulary for Amoxicillin 500mg"

Claude will use the provider_api_request tool, call the /formulary endpoint, and return results.

"Get my wallet balance"

Calls the /wallet-balance endpoint.

"Show me orders from last week"

Queries /orders with date filters.

Slash command

Link your project to a Famasi provider without leaving Claude Code:

/famasi-link-provider --provider-id YOUR_PROVIDER_ID

Example workflow

Terminal window
# 1. Install
npx @famasi/agents@latest install claude-code
# 2. Link provider
npx @famasi/agents@latest link provider --provider-id YOUR_PROVIDER_ID
# 3. Start Claude Code
claude
# 4. Query Famasi
"Search formulary for metformin"
"Create order for customer +2348012345678"
"Check order status ORD-12345"

Troubleshooting

“No provider linked”

Terminal window
npx @famasi/agents@latest link provider --provider-id YOUR_PROVIDER_ID

“Config incomplete”

Terminal window
npx @famasi/agents@latest doctor

“Authentication failed”

  • Check your provider ID
  • Re-run the link command
  • Verify your API key is set

More troubleshooting →