athena-tools
A Claude Code extension that embeds a senior athenahealth integration engineer in your development workflow, proactively catching data loss bugs and guiding safe DataView queries and API integrations.
README
Pallas — athenahealth Integration Engineer for Claude Code
A 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.
Try It in 30 Seconds
No install needed. Add this to any project's .claude/settings.json:
{
"mcpServers": {
"athena-tools": {
"url": "https://pallas-mcp-server.azurewebsites.net/sse"
}
}
}
Then open Claude Code and ask: "How do I safely join PATIENT to CHART in DataView?"
This 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.
Full Install
npx pallas-athena-tools setup
This installs to your user-level Claude Code config (~/.claude/):
- 12 MCP tools connected to the hosted knowledge base
- 9 slash commands (
/sql,/athena-api,/onboard,/diagnose, etc.) - CLAUDE.md with proactive safety rules and clinical context
Works in every project — no per-project configuration needed.
Other CLI commands
npx pallas-athena-tools status # Check installation
npx pallas-athena-tools uninstall # Remove everything
What It Does
- Proactive safety — Flags unsafe joins (46% data loss from PATIENTID/CHARTID mismatch), missing soft-delete filters, hardcoded credentials, and CONTEXTID issues
- Teaches the "why" — Not just "add this filter" but "here's why deleted records exist in healthcare and what happens if you include them"
- Knowledge base — 828 DataView views, 16K+ columns, 1.3K FK relationships, 1.9K API/FHIR/workflow docs
- Learning loop — Every interaction feeds lessons back to the KB. Low-risk patterns auto-merge; high-risk discoveries go through human review
- Working examples — Annotated SQL queries and API code templates in Python, TypeScript, and C#
Slash Commands
| Command | Description |
|---|---|
/onboard |
Guided onboarding for new athenahealth developers |
/sql <query> |
Generate safe DataView SQL with CONTEXTID, soft-delete, and correct joins |
/athena-api <goal> |
Generate API integration code with OAuth, retry, and error handling |
/diagnose <error> |
Diagnose API or DataView errors with root cause explanation |
/review-athena |
Scan project for athenahealth anti-patterns and safety issues |
/validate |
Pre-deployment safety check |
/explain <concept> |
Deep-dive explanation of any athenahealth concept |
/workflow <name> |
End-to-end clinical/admin workflow guidance |
/review-candidates |
Review and approve/reject pending KB update candidates |
MCP Tools
| Tool | Description |
|---|---|
athena_search_kb |
Full-text search across the knowledge base |
athena_explain_view |
DataView view schema, columns, relationships, and gotchas |
athena_explain_join |
Safe join path between two views with identity chain warnings |
athena_diagnose_error |
Error diagnosis with likely causes and fixes |
athena_explain_workflow |
Clinical/admin workflow documentation |
athena_suggest_workflow |
Recommended integration approach with anti-pattern detection |
athena_submit_feedback |
Report learned patterns back to the KB (learning loop) |
athena_list_candidates |
List pending KB update candidates for review |
athena_review_candidate |
Approve or reject a KB update candidate |
athena_report_safety_flag |
Record a fired proactive safety rule (v0.2.0) |
athena_report_outcome |
Record artifact intent and acceptance at end of interaction (v0.2.0) |
athena_command_start |
Beacon for slash command usage (v0.2.0) |
Learning Loop
The extension gets smarter from every developer interaction:
Developer uses Claude Code for athenahealth work
↓
Claude calls KB tools (search, explain, diagnose)
→ Each call is recorded (tool, duration, success/failure)
↓
Developer's issue is resolved
↓
Claude submits feedback: what worked, what was learned
↓
Classifier evaluates risk:
Low risk (error patterns, gotchas) → auto-merged, confidence 0.3
High risk (schema, identity) → queued for human review
↓
Reviewer approves → promoted to KB, confidence 0.7
↓
Next developer benefits from this knowledge
Development
Prerequisites
- Node.js 18+
- pnpm 9+
- Claude Code
Local Development
git clone https://github.com/nous-ehr/claude_pallas_extension.git
cd claude_pallas_extension
pnpm install
pnpm build
claude # Opens Claude Code with local MCP server
Environment Variables
| Variable | Default | Description |
|---|---|---|
PALLAS_KB_PATH |
./data |
Path to directory containing kb.json |
PALLAS_LOG_LEVEL |
error |
Log level: error, warn, info, debug |
PALLAS_TRANSPORT |
stdio |
Transport: stdio (local) or http (Azure) |
PALLAS_PORT |
8080 |
Port for HTTP transport |
COSMOS_ENDPOINT |
— | Azure Cosmos DB endpoint (enables learning loop) |
COSMOS_KEY |
— | Azure Cosmos DB key |
COSMOS_DATABASE |
pallas-kb |
Cosmos DB database name |
Project Structure
pallas_claude_extension/
├── CLAUDE.md # "Senior engineer" brain
├── data/kb.json # Knowledge base (828 views, 16K columns, 1.9K docs)
├── examples/ # Annotated SQL + API code templates
├── .claude/
│ ├── settings.json # MCP server config
│ └── commands/ # 9 slash commands
├── packages/
│ ├── mcp-server/ # MCP server (9 tools, dual transport)
│ │ └── src/
│ │ ├── server.ts # stdio + HTTP/SSE
│ │ ├── db/kbStore.ts # KB with MiniSearch
│ │ ├── tools/ # 9 tool implementations
│ │ └── learning/ # Event capture, classifier, Cosmos DB
│ └── cli/ # npm package installer
└── .github/workflows/deploy.yml # Auto-deploy to Azure on push
Architecture
This 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.
License
- Source code: MIT
- Knowledge base (
data/kb.json): CC BY-NC-SA 4.0 — non-commercial use only; contact maintainers for commercial licensing
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。