Skip to main content
Glama
README.md
# digital-mgmt-mcp

A Model Context Protocol (MCP) server for the Akij Resource Digital Management team, built with TypeScript and the official MCP SDK. It uses the **Streamable HTTP** transport so it can run as a Vercel serverless function (and also locally over stdio).

## Tools

| Tool | Description |
|------|-------------|
| `get_time` | Current UTC time / ISO timestamp / epoch ms |
| `echo` | Echo a message back |
| `calculate` | Safe arithmetic evaluation (`+ - * / % ( )`) |
| `digital_kpi_summary` | FY2026 Digital Management KPI summary (real DWH figures + sample marketing data), with optional SBU filter |

## Project layout

```
api/mcp.ts        Vercel entry — Express app + Streamable HTTP transport (deployed function)
src/tools.ts      Tool definitions (shared)
src/server.ts     Local HTTP dev server (npm run dev)
src/stdio.ts      Local stdio runner (npm run stdio)
vercel.json       Vercel build/function config
```

## Local development

```bash
npm install
npm run dev        # HTTP server on http://localhost:3000/mcp
# or
npm run stdio      # stdio transport (for local MCP clients)
```

## Deploy to Vercel

1. Install the Vercel CLI: `npm i -g vercel`
2. `vercel` (link the project) then `vercel --prod`
3. Your MCP endpoint will be `https://<project>.vercel.app/api/mcp`

## Push to GitHub

```bash
git init
git add .
git commit -m "init: digital management MCP server"
git branch -M main
gh repo create digital-mgmt-mcp --public --source=. --push
```

## Connect to the MCP

Add it as a remote MCP server in your client (e.g. `opencode.json`):

```json
{
  "mcp": {
    "digital-mgmt-mcp": {
      "type": "remote",
      "url": "https://<project>.vercel.app/api/mcp",
      "enabled": true
    }
  }
}
```

## Adding a tool

Register new tools in `src/tools.ts` with a zod schema for typed arguments:

```ts
server.tool(
  "my_tool",
  "What this tool does.",
  { input: z.string().describe("Description of the input") },
  async ({ input }) => ({
    content: [{ type: "text", text: `You said: ${input}` }],
  })
);
```

Secrets (API keys, DB credentials) belong in Vercel environment variables — never commit them.

Maintenance

ActivityMaintained
ResponsivenessNo issues