Skip to main content
Glama

POC — MCP Server + Clinical Agent

POC of technical feasibility for the two services in the Phase 2 plan, built on a custom Model Context Protocol server and the Anthropic API.

  1. Document scanning and analysis — triage, read, structure, suggest renewal for the doctor to approve, and investigate with the patient what the documents did not answer.

  2. Anamnesis agent — deduce the script from the doctor's description, validate it, register it as a specialty skill, and route from the general practitioner to the specialist when the case requires it.

There are 11 flows / 70 steps, executed against the real MCP server. No response was simulated: where a credential was missing, the step stopped.

Verdict, in two lines

Goal 1 — usable, with one caveat that the POC alone does not resolve: accuracy on real handwriting was not measured, and that is what decides whether the service is useful. Goal 2 — the mechanism is in place; whether an LLM-deduced script is clinically good is a medical judgment on content, not technical feasibility.

The full verdict, with what was validated step by step, is in findings.md.

Related MCP server: atlas_mcp

How to run

cp .env.example .env       # preencha ANTHROPIC_API_KEY
npm install
npm run poc                # servidor MCP (5190) + viewer (5180)

Open the viewer at http://localhost:5180 and execute the steps.

Before the first step: there is no sandbox — every execution is a billing event. Set a spend limit in the Anthropic console. MANUAL-SETUP.md has the step-by-step for this and everything else only you can do.

Suggested order: doc-triagem/step-01 first (the chair, ~US$ 0.002, the cheapest step — if it fails, nothing after is worth it), then the happy doc-* flows, doc-lote, the ana-* ones, and finally the alternative ones. Running everything costs about US$ 0.60; doc-lote is the most expensive (~US$ 0.22 of the US$ 0.60).

npm run check    # tsc + validação dos fluxos + suíte de defesas (27 casos)

The viewer

The viewer is not decoration — it is where the POC is read. Each step shows:

  • the raw HTTP request that goes to the MCP server, editable field by field;

  • the fixture it consumes, rendered inline (photos as images, PDFs in a frame) — and with a Replace… that accepts a photo of yours, handwritten, to re-execute without touching any file;

  • the code trail the call goes through, in order: transport → tool → domain → LLM. Clickable, opens in the editor (set POC_EDITOR in .env).

How it is set up

MCP server in Streamable HTTP statelesssessionIdGenerator: undefined, enableJsonResponse: true, new server and transport instance per request. Each call becomes a POST JSON-RPC with JSON response, which is what allows the viewer to show the call as the HTTP it is. Node 22 running .ts directly via tsx, no build.

mcp-server/      servidor MCP: transporte, tools, domínio, chamadas à LLM
handlers/        os poucos passos cujo corpo não cabe num template declarativo
flows/           os 11 fluxos, em steps.json editáveis
fixtures/        receitas, exames, PDFs — inclusive os de prompt injection
public/          o viewer
server.ts        o viewer (back-end)
checar-defesas.ts / checar-fluxos.py    a suíte que `npm run check` roda

Two things cut across both goals and stand on their own:

The three-stage pipeline paid for itself twice. Cost: triage runs on Haiku and answers a cheap perceptual question before OCR on Sonnet looks at the image. Safety: separating reading from interpretation gave a natural place for injection to be transcribed, flagged, and refused instead of obeyed.

The deterministic rule is what prevents the suggestion from becoming a decision. Renewal vetoes, spending cap, skill catalog, doctor validation — none depend on the model remembering on its own, and none costs a token.

Scope

This POC covered the simplest use case that works. Security, performance, and regulatory are deliberately out of scope and are work for the next steps — findings.md names each one in "Open issues".

Models retire on a set date — that is why ANTHROPIC_MODEL and ANTHROPIC_MODEL_TRIAGEM live in .env and not in code. findings.md records the known dates at the time of execution.

Documents

file

what it contains

findings.md

the verdict, what was validated, how it works, blockers and open issues

LEARNINGS.md

what the documentation didn't tell, what cost time, what the real execution showed

MANUAL-SETUP.md

what only you can do: key, spend limit, fixtures, CFM CRM, compliance

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Hosted MCP for denial, prior auth, reimbursement, workflow validation, batch scoring, and feedback.

  • MCP server for medicare-coverage

  • Hosted MCP server exposing US hospital procedure cost data to AI assistants

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rbrthmn/poc-mcp-agente-clinico'

If you have feedback or need assistance with the MCP directory API, please join our Discord server