# Atlas MCP

AI-powered MCP server for searching and conversing over FHIR R4 clinical documents. Features hybrid retrieval (BM25 + pgvector), cross-encoder reranking, LangGraph multi-agent workflow, PII masking, …

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add rsanandres/atlas_mcp

# Browse available tools
npx -y @smithery/cli@latest tool list rsanandres/atlas_mcp

# Get full schema for a tool
npx -y @smithery/cli@latest tool get rsanandres/atlas_mcp agent_query

# Call a tool
npx -y @smithery/cli@latest tool call rsanandres/atlas_mcp agent_query '{}'
```

## Direct MCP Connection

Endpoint: `https://atlas_mcp--rsanandres.run.tools`

## Tools (15)

- `agent_query` — Query the HC-AI agent with a natural language question. Uses a multi-agent workflow with query classification, hybrid s…
- `agent_clear_session` — Clear agent session history for a given session ID.
- `agent_health` — Check agent health status and configuration.
- `rerank` — Rerank documents by relevance to a query using cross-encoder models.
- `rerank_with_context` — Rerank documents with optional full FHIR bundle context.
- `batch_rerank` — Batch rerank multiple queries in parallel.
- `session_append_turn` — Append a conversation turn to session history.
- `session_get` — Get session state including recent turns and summary.
- `session_update_summary` — Update the session summary.
- `session_clear` — Clear all session data for a session ID.
- `ingest` — Ingest a clinical note for chunking and embedding into the vector database.
- `embeddings_health` — Check embeddings service health and configuration.
- `db_stats` — Get database connection and queue statistics.
- `db_queue` — Get ingestion queue status.
- `db_errors` — Get error logs with optional filtering.

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get rsanandres/atlas_mcp <tool-name>
```
