npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cmap-mcp-server

v1.2.0

Published

Model Context Protocol (MCP) server for CMAP Construction Management API - enables natural language queries to CMAP business data

Readme

CMAP MCP Server

A Model Context Protocol (MCP) server that provides natural language access to CMAP Construction Management API data through Claude Desktop.

npm version License: MIT

🚀 Features

  • Natural Language Queries: Ask questions about your CMAP data in plain English
  • Comprehensive API Coverage: Access companies, projects, users, contacts, and detailed financial data
  • Relationship Intelligence: Built-in understanding of data relationships and foreign keys
  • Business Intelligence: Complex multi-step queries for financial analysis and reporting
  • Real-time Data: Live connection to CMAP sandbox and production environments

📋 What You Can Query

Business Data

  • Companies: 365+ construction companies and organizations
  • Projects: Project portfolios with financial details, status, and team assignments
  • Users: Team members with roles (Clinical Safety Officers, Project Managers, etc.)
  • Contacts: Business contacts organized by company
  • Financial Data: Project values, budgets, completion percentages

Example Queries

"How much total project value has Stuart Harrison managed?"

"Show me all NHS organizations and their active projects"

"Who are the Clinical Safety Officers and what projects are they working on?"

"Which projects are over £50,000 in value?"

"Find contacts at Google UK Limited"

🛠 Installation

Option 1: Use with npx (Recommended)

npx @shopp/cmap-mcp-server

Option 2: Global Installation

npm install -g @shopp/cmap-mcp-server
cmap-mcp-server

Option 3: Local Development

git clone https://github.com/shopp/cmap-mcp-server.git
cd cmap-mcp-server
npm install
npm run build
npm start

⚙️ Configuration

Environment Variables

Create a .env file or set environment variables:

CMAP_CLIENT_ID=your-cmap-client-id
CMAP_CLIENT_SECRET=your-cmap-client-secret
CMAP_TENANT_ID=your-cmap-tenant-id
CMAP_BASE_URL=https://api.cmap-sandbox.com  # or production URL

Claude Desktop Setup

Add to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "cmap": {
      "command": "npx",
      "args": ["-y", "@shopp/cmap-mcp-server"],
      "env": {
        "CMAP_CLIENT_ID": "your-client-id",
        "CMAP_CLIENT_SECRET": "your-client-secret", 
        "CMAP_TENANT_ID": "your-tenant-id",
        "CMAP_BASE_URL": "https://api.cmap-sandbox.com"
      }
    }
  }
}

📊 Available Tools

| Tool | Description | Parameters | |------|-------------|------------| | get_companies | Retrieve company directory | page, per_page | | get_projects | Get project listings with filters | page, per_page, status, query | | get_project | Detailed project financial data | project_id (required) | | get_users | Team member directory | page, per_page | | get_contacts | Contact directory | page, per_page, company_id | | health_check | Verify API connectivity | None |

🔗 Data Relationships

The server includes built-in intelligence about CMAP data relationships:

  • Companies ↔ Projects: companies.id = projects.CompanyID
  • Projects ↔ Users: projects.Owner/ProjectManager = users.firstname + lastname
  • Companies ↔ Contacts: companies.id = contacts.companyId

💡 Usage Examples

Financial Analysis

"Calculate the total project value for all Clinical Safety Officers"

Business Intelligence

"Show me the top 5 companies by total project value and their key contacts"

Team Management

"What's the workload distribution among project managers?"

Relationship Queries

"Find all NHS projects over £30k and show me the project teams"

🏗 Architecture

Built using:

  • MCP SDK: Official Model Context Protocol implementation
  • TypeScript: Type-safe development
  • Node.js: Cross-platform runtime
  • OAuth2: Secure CMAP API authentication

🔒 Authentication

Uses OAuth2 Client Credentials flow with:

  • Grant Type: client_credentials
  • Scope: api_access
  • Token Management: Automatic refresh and caching

📈 Performance

  • Fast Integration: 80% faster than traditional API development (3-5 days vs 4-6 weeks)
  • Efficient Queries: Smart relationship mapping reduces API calls
  • Caching: Token caching and reuse for optimal performance

🛡 Security

  • Environment variable configuration
  • No credentials stored in code
  • Secure OAuth2 implementation
  • Production-ready error handling

📝 Development

Prerequisites

  • Node.js 18+
  • CMAP API credentials
  • TypeScript knowledge (optional)

Local Development

git clone https://github.com/shopp/cmap-mcp-server.git
cd cmap-mcp-server
npm install
cp .env.example .env  # Add your credentials
npm run dev

Building

npm run build

Testing

npm test

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

📞 Support

🙏 Acknowledgments


Made with ❤️ by ETHOS Digital Health Team