{
  "markdown": "# Pallas — athenahealth Integration Engineer for Claude Code\n\nA Claude Code extension that embeds a senior athenahealth integration engineer in your development workflow. Proactively catches data loss bugs, teaches clinical context, guides you through safe DataView queries and API integrations, and **gets smarter from every interaction** through a built-in learning loop.\n\n## Try It in 30 Seconds\n\nNo install needed. Add this to any project's `.claude/settings.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"athena-tools\": {\n      \"url\": \"https://pallas-mcp-server.azurewebsites.net/sse\"\n    }\n  }\n}\n```\n\nThen open Claude Code and ask: *\"How do I safely join PATIENT to CHART in DataView?\"*\n\nThis gives you all 12 MCP tools via the hosted server. For the full experience (slash commands, proactive safety rules, CLAUDE.md guidance), use the install method below.\n\n## Full Install\n\n```bash\nnpx pallas-athena-tools setup\n```\n\nThis installs to your user-level Claude Code config (`~/.claude/`):\n- 12 MCP tools connected to the hosted knowledge base\n- 9 slash commands (`/sql`, `/athena-api`, `/onboard`, `/diagnose`, etc.)\n- CLAUDE.md with proactive safety rules and clinical context\n\nWorks in **every project** — no per-project configuration needed.\n\n### Other CLI commands\n\n```bash\nnpx pallas-athena-tools status      # Check installation\nnpx pallas-athena-tools uninstall   # Remove everything\n```\n\n## What It Does\n\n- **Proactive safety** — Flags unsafe joins (46% data loss from PATIENTID/CHARTID mismatch), missing soft-delete filters, hardcoded credentials, and CONTEXTID issues\n- **Teaches the \"why\"** — Not just \"add this filter\" but \"here's why deleted records exist in healthcare and what happens if you include them\"\n- **Knowledge base** — 828 DataView views, 16K+ columns, 1.3K FK relationships, 1.9K API/FHIR/workflow docs\n- **Learning loop** — Every interaction feeds lessons back to the KB. Low-risk patterns auto-merge; high-risk discoveries go through human review\n- **Working examples** — Annotated SQL queries and API code templates in Python, TypeScript, and C#\n\n## Slash Commands\n\n| Command | Description |\n|---|---|\n| `/onboard` | Guided onboarding for new athenahealth developers |\n| `/sql <query>` | Generate safe DataView SQL with CONTEXTID, soft-delete, and correct joins |\n| `/athena-api <goal>` | Generate API integration code with OAuth, retry, and error handling |\n| `/diagnose <error>` | Diagnose API or DataView errors with root cause explanation |\n| `/review-athena` | Scan project for athenahealth anti-patterns and safety issues |\n| `/validate` | Pre-deployment safety check |\n| `/explain <concept>` | Deep-dive explanation of any athenahealth concept |\n| `/workflow <name>` | End-to-end clinical/admin workflow guidance |\n| `/review-candidates` | Review and approve/reject pending KB update candidates |\n\n## MCP Tools\n\n| Tool | Description |\n|---|---|\n| `athena_search_kb` | Full-text search across the knowledge base |\n| `athena_explain_view` | DataView view schema, columns, relationships, and gotchas |\n| `athena_explain_join` | Safe join path between two views with identity chain warnings |\n| `athena_diagnose_error` | Error diagnosis with likely causes and fixes |\n| `athena_explain_workflow` | Clinical/admin workflow documentation |\n| `athena_suggest_workflow` | Recommended integration approach with anti-pattern detection |\n| `athena_submit_feedback` | Report learned patterns back to the KB (learning loop) |\n| `athena_list_candidates` | List pending KB update candidates for review |\n| `athena_review_candidate` | Approve or reject a KB update candidate |\n| `athena_report_safety_flag` | Record a fired proactive safety rule (v0.2.0) |\n| `athena_report_outcome` | Record artifact intent and acceptance at end of interaction (v0.2.0) |\n| `athena_command_start` | Beacon for slash command usage (v0.2.0) |\n\n## Learning Loop\n\nThe extension gets smarter from every developer interaction:\n\n```\nDeveloper uses Claude Code for athenahealth work\n    ↓\nClaude calls KB tools (search, explain, diagnose)\n    → Each call is recorded (tool, duration, success/failure)\n    ↓\nDeveloper's issue is resolved\n    ↓\nClaude submits feedback: what worked, what was learned\n    ↓\nClassifier evaluates risk:\n    Low risk (error patterns, gotchas) → auto-merged, confidence 0.3\n    High risk (schema, identity)       → queued for human review\n    ↓\nReviewer approves → promoted to KB, confidence 0.7\n    ↓\nNext developer benefits from this knowledge\n```\n\n## Development\n\n### Prerequisites\n\n- [Node.js](https://nodejs.org/) 18+\n- [pnpm](https://pnpm.io/) 9+\n- [Claude Code](https://claude.ai/code)\n\n### Local Development\n\n```bash\ngit clone https://github.com/nous-ehr/claude_pallas_extension.git\ncd claude_pallas_extension\npnpm install\npnpm build\nclaude    # Opens Claude Code with local MCP server\n```\n\n### Environment Variables\n\n| Variable | Default | Description |\n|---|---|---|\n| `PALLAS_KB_PATH` | `./data` | Path to directory containing `kb.json` |\n| `PALLAS_LOG_LEVEL` | `error` | Log level: `error`, `warn`, `info`, `debug` |\n| `PALLAS_TRANSPORT` | `stdio` | Transport: `stdio` (local) or `http` (Azure) |\n| `PALLAS_PORT` | `8080` | Port for HTTP transport |\n| `COSMOS_ENDPOINT` | — | Azure Cosmos DB endpoint (enables learning loop) |\n| `COSMOS_KEY` | — | Azure Cosmos DB key |\n| `COSMOS_DATABASE` | `pallas-kb` | Cosmos DB database name |\n\n### Project Structure\n\n```\npallas_claude_extension/\n├── CLAUDE.md                     # \"Senior engineer\" brain\n├── data/kb.json                  # Knowledge base (828 views, 16K columns, 1.9K docs)\n├── examples/                     # Annotated SQL + API code templates\n├── .claude/\n│   ├── settings.json             # MCP server config\n│   └── commands/                 # 9 slash commands\n├── packages/\n│   ├── mcp-server/               # MCP server (9 tools, dual transport)\n│   │   └── src/\n│   │       ├── server.ts         # stdio + HTTP/SSE\n│   │       ├── db/kbStore.ts     # KB with MiniSearch\n│   │       ├── tools/            # 9 tool implementations\n│   │       └── learning/         # Event capture, classifier, Cosmos DB\n│   └── cli/                      # npm package installer\n└── .github/workflows/deploy.yml  # Auto-deploy to Azure on push\n```\n\n## Architecture\n\nThis extension is **fully independent** from the Athena Tools VS Code extension. They share the same knowledge base source data but have separate codebases, separate deployments, and separate evolution paths. Neither can break the other.\n\n## License\n\n- **Source code**: [MIT](LICENSE)\n- **Knowledge base** (`data/kb.json`): [CC BY-NC-SA 4.0](LICENSE-DATA) — non-commercial use only; contact maintainers for commercial licensing\n",
  "bytes": 6674,
  "sha": "1a298944698f159568dba42a32fbbbfb8a0766c8a2ef5e3bf42c4316141d623a",
  "repo_slug": "nous-ehr/claude_pallas_extension",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_nous_ehr_athena_tools_e14132d7/readme"
}