Skip to main content
Glama
Saipranoy

mcp-crm

by Saipranoy

mcp-crm

A learning project: a Model Context Protocol server that exposes a CRM to an MCP client over stdio.

Sign-in goes through Microsoft Entra using the device-code flow. The resulting identity token is exchanged for a CRM access token, so CRM queries run as the signed-in user and return only what that user is allowed to see.

Requirements

  • Node.js 20+

  • An Entra app registration with the device-code (public client) flow enabled

  • A CRM API that accepts an Entra token at POST /api/auth/entra and serves GET /api/accounts

Related MCP server: M365 Copilot Web Bridge

Setup

npm install

Create a .env in the project root:

ENTRA_CLIENT_ID=<your app registration's client id>
ENTRA_TENANT_ID=<your directory tenant id>
CRM_API_BASE_URL=https://your-crm.example.com

All three are required — the server throws on startup if any is missing. .env is gitignored; never commit it.

Running

npx tsx src/index.ts     # run directly
npx tsc                  # type-check and build to dist/

The server speaks MCP over stdio, so it is normally launched by a client rather than by hand. To register it with Claude Code:

{
  "mcpServers": {
    "crm": {
      "command": "npx",
      "args": ["tsx", "/absolute/path/to/mcp-crm/src/index.ts"]
    }
  }
}

Log output goes to stderr, since stdout carries the MCP protocol.

Tools

Tool

Description

start_crm_login

Begins Entra device-code sign-in and returns the code and URL to visit. Returns immediately; the sign-in completes in the background.

crm_login_status

Reports whether that sign-in has finished, is still pending, or failed.

search_crm_accounts

Searches real CRM accounts by name. Requires a completed sign-in. Returns up to 25 matches with id, name, status, and sales_rep.

search_accounts

Searches a small hardcoded list of sample accounts. No auth needed — used for testing the wiring without a live CRM.

Sign-in flow

start_crm_login cannot block until Entra finishes, so it is split in two:

  1. Call start_crm_login. It returns the device code and the URL to open.

  2. Complete sign-in in the browser.

  3. Call crm_login_status to confirm. Once it reports a signed-in user, search_crm_accounts will work.

The token is held in memory only — restarting the server means signing in again.

License

ISC

A
license - permissive license
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

  • F
    license
    Not graded
    quality
    D
    maintenance
    Bridges stdio-based LLM harnesses to OAuth-protected remote MCP servers via Streamable HTTP, handling PKCE browser login and token refresh automatically.
    9
  • F
    license
    Not graded
    quality
    B
    maintenance
    Provides MCP tools to interact with GoHighLevel CRM data, including contacts, conversations, call transcripts, broker lead overviews, pipelines/opportunities, and task creation. Supports both stdio and HTTP transports for local and remote use.

View all related MCP servers

Related MCP Connectors

  • Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.

  • Official Microsoft MCP Server to query Microsoft Entra data using natural language

  • Query SEC EDGAR filings, XBRL financials, and company data through MCP. STDIO & Streamable HTTP.

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/Saipranoy/mcp-crm'

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