
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@oktopeak/filevine-mcp
Advanced tools
Open-source MCP server connecting Claude to Filevine practice management. Built by Oktopeak.
An open-source MCP (Model Context Protocol) server connecting Claude to Filevine practice management platform. Access cases, contacts, documents, notes, tasks, and custom PI data from Claude with automatic rate limiting and audit logging.
Supported Endpoints: 15 tools covering the Filevine v2 REST API.
Personal Access Token (PAT)
Client Credentials
Organization & User IDs (auto-discovered on first auth call)
/v2/users/me on first runCopy .env.example to .env:
# Filevine OAuth client credentials
FILEVINE_CLIENT_ID=<from Settings → Client Secrets>
FILEVINE_CLIENT_SECRET=<from Settings → Client Secrets>
FILEVINE_PAT=<from Settings → Access Tokens>
# API region (us or ca)
FILEVINE_REGION=us
# Token encryption key (generate new one)
# node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
ENCRYPTION_KEY=<64-character-hex-string>
npm install
npm run build
# Start the server
npm start
# Or use MCP inspector for debugging
npm run inspect
The server listens on stdio and outputs connection status to stderr.
Before using any Filevine tools, call the authenticate tool:
Tool: authenticate
→ Exchanges PAT for access token
→ Discovers org_id and user_id
→ Stores encrypted tokens in ~/.oktopeak-filevine/tokens.enc
Tokens auto-refresh before expiry (3600s TTL). Call logout to clear stored tokens.
| Tool | Purpose |
|---|---|
authenticate | Exchange PAT for access token and cache org/user IDs |
auth-status | Check authentication status and token expiry |
logout | Clear stored tokens |
| Tool | Purpose |
|---|---|
list-cases | List cases (active, closed, pending); search by name/number |
get-case | Get full case details by ID |
| Tool | Purpose |
|---|---|
search-contacts | Search contacts by name, email, or phone across all cases |
get-contact | Get contact details by ID |
list-case-contacts | List all contacts on a specific case |
| Tool | Purpose |
|---|---|
list-notes | List case notes; supports general, phone_call, and internal types |
create-note | Create a note (e.g., AI summary, findings, follow-ups) |
| Tool | Purpose |
|---|---|
list-documents | List case documents with metadata (name, type, size, URL, dates) |
Note: Returns document metadata only — no binary content. Use returned URLs to fetch document content if needed.
| Tool | Purpose |
|---|---|
list-tasks | List case tasks by status (open, completed, overdue) |
create-task | Create a new task with title, description, assignee, due date |
Known Issue: The targetDate field may be ignored by the Filevine API as of Aug 2025. Workaround: set tasks via UI.
| Tool | Purpose |
|---|---|
discover-schema | Map your firm's custom sections (medical records, liens, settlements, etc.) |
get-collection | Fetch custom collection data using discovered selectors |
Why collections matter: Unlike standardized case fields, each firm builds custom "Collection sections" for PI workflows. The discover-schema tool finds your firm's structure.
Example workflow:
discover-schema → see available sections (e.g., "MedicalRecords", "Liens")get-collection to fetch PI-specific dataFilevine Rate Limits:
| Endpoint | Limit |
|---|---|
| Standard | 320 req/endpoint/min |
| Billing | 250 req/endpoint/min |
| Reports/Vitals | 5 req/endpoint/min |
| VineSign | 10 req/user/month |
Implementation:
Token Exchange (on first authenticate call)
POST https://identity.filevine.com/connect/token
client_id, client_secret, grant_type=personal_access_token, token=PAT
→ access_token (3600s), refresh_token, scopes
Org/User Discovery
GET /v2/users/me
Authorization: Bearer {access_token}
→ {id: user_id, org_id: org_id}
Every API Request (3 required headers)
Authorization: Bearer {access_token}
x-fv-orgid: {org_id}
x-fv-userid: {user_id}
https://api.filevine.iohttps://api.filevine.caSet via FILEVINE_REGION environment variable.
The biggest difference from other legal APIs: every request needs 3 headers, not just Authorization. Filevine uses x-fv-orgid and x-fv-userid to scope queries to the correct organization and user context.
src/
├── index.ts # Server entry point
├── filevine-client.ts # API client with 3-header middleware
├── auth/
│ ├── authTools.ts # authenticate, auth-status, logout
│ ├── oauth.ts # PAT token exchange + org/user discovery
│ └── token-store.ts # AES-256-GCM encrypted token storage
├── tools/
│ ├── cases.ts # list-cases, get-case
│ ├── contacts.ts # search-contacts, get-contact, list-case-contacts
│ ├── notes.ts # list-notes, create-note
│ ├── documents.ts # list-documents
│ ├── tasks.ts # list-tasks, create-task
│ └── collections.ts # discover-schema, get-collection
├── resources/
│ ├── auth-status.ts # Auth status resource (filevine://auth/status)
│ └── compliance.ts # Compliance notice
├── audit/
│ └── logger.ts # Audit logging (JSON-lines)
└── utils/
└── rate-limiter.ts # Token bucket + 429 backoff
Tokens are encrypted with AES-256-GCM and stored locally:
~/.oktopeak-filevine/tokens.encENCRYPTION_KEY from .env (64-char hex)Every tool call is logged to ~/.oktopeak-filevine/audit.log:
| Error | Cause | Fix |
|---|---|---|
ENCRYPTION_KEY is not set | Missing env var | Generate key: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" |
PAT exchange failed (401) | Invalid credentials | Verify Client ID, Secret, PAT from Filevine Settings |
Failed to discover user info | Token doesn't have required scopes | Regenerate PAT and Client Credentials in Filevine |
429 Too Many Requests | Rate limit hit | Server auto-backs off; normal behavior under load |
Unknown collection selector | Selector not found | Run discover-schema to find available selectors |
npm run build → build/ directory@modelcontextprotocol/sdk — MCP protocoldotenv — Environment loadingzod — Schema validation for tool parameterscrypto, fs, http — Node builtinsnpm run inspect
Opens MCP inspector at http://localhost:3000 — test tools, check parameters, verify responses.
npm run build
npm start
# In another terminal:
npm run inspect
ENCRYPTION_KEYcreate-note and create-task modify dataSee src/resources/compliance.ts for full compliance notice.
MIT — Oktopeak
FAQs
Open-source MCP server connecting Claude to Filevine practice management. Built by Oktopeak.
The npm package @oktopeak/filevine-mcp receives a total of 21 weekly downloads. As such, @oktopeak/filevine-mcp popularity was classified as not popular.
We found that @oktopeak/filevine-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.