Skip to main content
Glama
Primer MSD & Social Enterprise MCP Server

Primer MSD & Social Enterprise MCP Server

by saihanlinn
README.md
# Primer MSD & Social Enterprise MCP Server (`services.linn/msd`)

Zero-authentication remote Model Context Protocol (MCP) server and REST API for Market Systems Development (MSD / M4P), DCED results measurement, private sector deal modeling, and Social Enterprise research.

- **Official MCP Endpoint:** `https://msd.linn.services/mcp` (Streamable HTTP, JSON-RPC 2.0)
- **Interactive API Docs:** [https://msd.linn.services/docs](https://msd.linn.services/docs)
- **Browsable HTML Catalog (2,523 entries):** [https://msd.linn.services/catalog](https://msd.linn.services/catalog)
- **Free Browser Calculators:** [https://primer.linn.services/market-systems/](https://primer.linn.services/market-systems/)
- **AI Agent Summary (`llms.txt`):** [https://msd.linn.services/llms.txt](https://msd.linn.services/llms.txt)

## What You Get

This server indexes **2,523 curated guides, tools, donor programmes, and social enterprise reports** (66,649 cataloged assets) from DCED, BEAM Exchange, MSD4E, SEWF, ILO The Lab, ANDE, WEF Schwab Foundation, British Council, and UN ESCAP, plus deterministic math tools for field teams.

### Available MCP Tools

| Tool Name | Purpose |
| :--- | :--- |
| `search_msd_knowledge` | Full-text search across DCED standards, BEAM tools, MSD4E employment guides, global donor programmes, and Social Enterprise publications. |
| `calculate_deal` | Model rural retail dealer gross margins, 7-to-14-day inventory cash cycles, working capital inflation decay, and farmer payback months. |
| `calculate_dced_attribution` | Calculate Net Additional Income (NAI) after deadweight, displacement, and substitution, plus crowding-in and 240-day FTE jobs. |
| `lint_proposal` | Audit draft concept notes or terms of reference for direct giveaway risks, missing private match, 100% attribution claims, and currency peg traps. |

### Free Interactive Web Calculators

- [DCED Sample Size Calculator](https://primer.linn.services/market-systems/dced-sample-size-calculator/)
- [AAER Framework & Will-Skill Checker](https://primer.linn.services/market-systems/aaer-framework-checker/)
- [Rural Dealer Payback Calculator](https://primer.linn.services/market-systems/dealer-payback-calculator/)
- [DCED Attribution & FTE Jobs Calculator](https://primer.linn.services/market-systems/dced-attribution-calculator/)
- [MSD Concept Note Linter](https://primer.linn.services/market-systems/msd-proposal-linter/)

## Quick Setup in AI Clients

### Cursor / Windsurf / Streamable HTTP Clients

Add to `.cursor/mcp.json` or your MCP configuration:

```json
{
  "mcpServers": {
    "primer-msd": {
      "url": "https://msd.linn.services/mcp"
    }
  }
}
```

### Claude Desktop (via `mcp-remote`)

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "primer-msd": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://msd.linn.services/mcp"]
    }
  }
}
```

### Direct JSON-RPC 2.0 Test

```bash
curl -s -X POST https://msd.linn.services/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_msd_knowledge","arguments":{"query":"results chain","limit":3}}}'
```

See [examples/rest_examples.sh](examples/rest_examples.sh) and [examples/python_client.py](examples/python_client.py) for more snippets.

## Repository Scope & Open Knowledge Notice

This public repository contains documentation, client examples, and the Official MCP Registry `server.json` manifest for the hosted remote endpoint at `https://msd.linn.services/mcp`.

Primer International does not claim ownership of indexed third-party publications. All original materials belong to DCED, BEAM Exchange, SEWF, ILO, ANDE, WEF Schwab Foundation, British Council, UN ESCAP, and contributing authors. Search responses return short reference excerpts with direct links to original publisher pages.

Takedown requests or bug reports: `primer@linn.services` (takedowns handled within 48 hours).