Build a Sales MCP Server for Claude
Create a Model Context Protocol server that gives Claude access to your sales tools, CRM data, and custom prompts.
The `mcp-server/` package in this repo is a real, working Model Context Protocol server — `gtm-mcp-server` — that adds 18 sales tools to Claude Code and Claude Desktop. Ten are content-generation tools (research, drafting, objection handling), eight make real HTTP calls into HubSpot's CRM API when you set `HUBSPOT_API_KEY`, and on top of the tools there are 3 basic prompts and 6 multi-step "agentic workflows" that chain tools together. This tutorial builds it from source and wires it into both Claude clients.
Prerequisites
- Node.js and npm installed
- Claude Code or Claude Desktop
- A HubSpot private app token if you want the CRM tools (optional — content-generation tools work without it)
Step-by-Step
Know what you're building
The server is a single TypeScript entry point (`src/index.ts`) plus `src/integrations/hubspot.ts` for the real API calls and `src/ui/` for six MCP Apps interactive UIs (email composer, LinkedIn message card, research card, lead profile, objection handler, sequence timeline) that render in Claude Desktop. It's built with `@modelcontextprotocol/sdk` and `zod` for schema validation, compiled with `tsc`, and run with plain `node`.
Clone the repo and install dependencies
The MCP server lives inside the monorepo at `mcp-server/`. Clone the repo, move into that directory, and install with npm.
git clone https://github.com/gtm-skills/gtm.git cd gtm-skills/mcp-server npm install
Build the server
Compile TypeScript to `dist/index.js`. This is the file both Claude Code and Claude Desktop will launch as a subprocess. If you're actively editing the server, `npm run dev` runs it directly with `tsx` instead of a compile step.
npm run build
npm run dev
Connect HubSpot for the real CRM tools (optional)
Without a HubSpot key, you still get all 10 content-generation tools. Setting `HUBSPOT_API_KEY` unlocks 8 tools that hit HubSpot's live API: `hubspot_create_contact`, `hubspot_update_contact`, `hubspot_get_contact`, `hubspot_search_contacts`, `hubspot_create_deal`, `hubspot_update_deal`, `hubspot_log_activity`, and `hubspot_get_pipelines`. Generate the token from HubSpot Settings → Integrations → Private Apps, granting `crm.objects.contacts`, `crm.objects.deals`, and `crm.objects.companies` scopes.
export HUBSPOT_API_KEY=pat-na1-xxxxxxxx
Register the server with Claude Code
Add the server to your project's `.claude/settings.json`. Claude Code will spawn it as a subprocess and expose all 18 tools plus the prompts and workflows in-session.
{
"mcpServers": {
"gtm": {
"command": "node",
"args": ["./mcp-server/dist/index.js"]
}
}
}Register the server with Claude Desktop
For Claude Desktop, edit the app's config file directly and use an absolute path to `dist/index.js` (relative paths won't resolve the same way outside a project directory). This is also what unlocks the MCP Apps interactive UIs — Claude Code gets the same tool output as text.
{
"mcpServers": {
"gtm": {
"command": "node",
"args": ["/absolute/path/to/mcp-server/dist/index.js"]
}
}
}Try a content-generation tool
Restart Claude and ask it to use one of the research or drafting tools by name. Claude will call the tool, and in Desktop you'll see the matching interactive UI (a company research card with expandable sections and checklists, in this case).
Use the research_company tool to research Stripe for potential outreach to their engineering team.
Try a HubSpot-backed tool
If you set `HUBSPOT_API_KEY`, these tools make real writes to your CRM — verify in HubSpot after running one that the contact or activity actually landed.
Use hubspot_create_contact to add: - Email: sarah.chen@acme.com - First name: Sarah - Last name: Chen - Company: Acme Corp - Job title: VP of Sales
Use hubspot_log_activity: - Contact ID: 12345 - Activity type: email - Subject: Follow-up on demo - Body: Sent proposal as discussed. Following up next week.
Chain tools with an agentic workflow
Beyond individual tools, the server ships 6 multi-step workflows that orchestrate several tools in sequence: `prospecting_workflow`, `account_strategy`, `competitive_deal_workflow`, `reengagement_workflow`, `enterprise_expansion`, and `full_sales_cycle`. Invoke one by describing the account — Claude runs research, drafting, and (if HubSpot is connected) CRM logging as one pass.
Run the full_sales_cycle workflow for: - Company: Enterprise Co - Persona: Head of Operations - Product: Workflow automation platform - Pain point: Manual data entry eating up team time
Know what's next on the roadmap
HubSpot is the only live integration today. Apollo enrichment is next, with Gmail/Outlook sending, Calendly/Cal.com booking, and a direct OpenClaw connection planned after that — so this server and the OpenClaw fleet tutorial above are converging toward the same end state: research, write, send, book, and track without leaving Claude or the terminal.
Wrap-Up
You now have a working MCP server exposing 18 sales tools, real HubSpot writes, and 6 chainable workflows to both Claude Code and Claude Desktop. Pair it with Clay (next tutorial) for live data enrichment the content-generation tools can't provide on their own.