Skip to content

Claude Code

Claude Code

Claude Code is Anthropic’s terminal-based AI coding assistant. With Famasi integration, you can manage pharmacy operations directly from your command line using natural language.

What is Claude Code?

Claude Code brings Claude’s capabilities to your terminal. It can:

  • Read and edit files
  • Run commands
  • Use external tools via MCP
  • Understand your entire codebase

With Famasi MCP, Claude Code becomes your pharmacy assistant too.

Installation

Step 1: Install Claude Code

Terminal window
# Install globally
npm install -g @anthropic-ai/claude-code
# Or use npx
npx @anthropic-ai/claude-code

Step 2: Install Famasi Integration

Terminal window
# Install Famasi MCP for Claude Code
npx @famasi/agents@latest install claude-code

This creates:

  • .mcp.json — MCP server configuration
  • .claude/agents/famasi-provider.md — Agent persona
  • .claude/commands/famasi-link-provider.md — Custom command
Terminal window
# Link your provider account
npx @famasi/agents@latest link provider --provider-id YOUR_PROVIDER_ID
# Or link as individual
npx @famasi/agents@latest link individual --phone +2348012345678

Step 4: Verify

Terminal window
# Check everything is working
npx @famasi/agents@latest doctor

Using Famasi in Claude Code

Start Claude Code in your project directory:

Terminal window
claude

Then ask naturally:

You: Search for Amoxicillin 500mg near Lekki
Claude: I'll search for Amoxicillin 500mg near Lekki for you.
[Uses search_medications tool]
Claude: I found Amoxicillin 500mg at these pharmacies:
1. GreenCross Pharmacy (0.5km)
Price: ₦2,500
Stock: 45 units
2. HealthPlus (1.2km)
Price: ₦2,300
Stock: 12 units
Would you like me to place an order?

Common Tasks

Search Medications

"Find diabetes medication"
"Search for Panadol Extra near me"
"What pharmacies have Ventolin inhaler?"

Place Orders

"Order 2 packs of Amoxicillin from GreenCross"
"Create an order for customer +2348012345678"
"Place order for pickup at the Lekki branch"

Track Orders

"Check status of order ORD-789"
"Show my recent orders"
"When will my delivery arrive?"

Provider Operations

"List all my customers"
"What's my wallet balance?"
"Show today's orders"
"Add a new customer"

Slash Commands

Claude Code supports custom slash commands:

/famasi-link-provider Link provider account
/famasi-status Check connection status
/famasi-orders View recent orders
/famasi-customers List customers

Tips for Best Results

  1. Be specific: “Find Amoxicillin at GreenCross” works better than “Find medicine”
  2. Include details: Mention quantities, delivery preferences, customer info
  3. Iterate: Claude will ask for missing information
  4. Use context: Reference previous orders or customers

Troubleshooting

IssueSolution
”MCP server not found”Run npx @famasi/agents@latest install claude-code
”Not authenticated”Run npx @famasi/agents@latest link provider
Tools not appearingCheck .mcp.json exists and restart Claude Code
Slow responsesCheck your internet connection

Configuration

The .mcp.json file controls the MCP connection:

{
"mcpServers": {
"famasi": {
"command": "npx",
"args": ["@famasi/agents@latest", "mcp"],
"env": {
"FAMASI_PROVIDER_ID": "your-provider-id"
}
}
}
}

Next steps