Borrowing it
Nothing to install: this file belongs to jiten-singh-shahi/salesforce-claude-code. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/jiten-singh-shahi/salesforce-claude-code/main/.cursor/skills/mcp-server-patterns/SKILL.mdgit clone --depth 1 https://github.com/jiten-singh-shahi/salesforce-claude-codeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/jiten-singh-shahi/salesforce-claude-code/mcp-server-patterns)<a href="https://agentmods.dev/skills/jiten-singh-shahi/salesforce-claude-code/mcp-server-patterns"><img src="https://agentmods.dev/badge/skills/jiten-singh-shahi/salesforce-claude-code/mcp-server-patterns.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.01529 |
| Opus 5 | $0.00026 | $0.00764 |
| Sonnet 5 | $0.00010 | $0.00306 |
| Haiku 4.5 | $0.00005 | $0.00153 |
Grade A, and why
mcp-server-patterns scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
import { execFileSync } from "child_process"; How it starts
The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MCP Server Patterns
The Model Context Protocol (MCP) lets AI assistants call tools, read resources, and use prompts from your server. Use this skill when building or maintaining MCP servers, or integrating with the official Salesforce MCP server. The SDK API evolves; check Context7 (query-docs for "MCP") or the official MCP documentation for current method names and signatures.
When to Use
Use when: implementing a new MCP server, adding tools or resources, choosing stdio vs HTTP, integrating with @salesforce/mcp, upgrading the SDK, or debugging MCP registration and transport issues.
How It Works
Core Concepts
- Tools: Actions the model can invoke (e.g. search, run a command). Register with
registerTool()ortool()depending on SDK version. - Resources: Read-only data the model can fetch (e.g. file contents, API responses). Register with
registerResource()orresource(). Handlers typically receive auriargument. - Prompts: Reusable, parameterised prompt templates the client can surface (e.g. in Claude Desktop). Register with
registerPrompt()or equivalent. - Transport: stdio for local clients (e.g. Claude Desktop); Streamable HTTP is preferred for remote (Cursor, cloud). Legacy HTTP/SSE is for backward compatibility.
The Node/TypeScript SDK may expose tool() / resource() or registerTool() / registerResource(); the official SDK has changed over time. Always verify against the current MCP docs or Context7.
Transport Decision Guide
| Transport | Use When | Examples |
|---|---|---|
| stdio | Local client, same machine, Claude Desktop/Code | Development, local testing |
| Streamable HTTP | Remote clients, cloud deployment, multi-user | Cursor, production APIs |
| Legacy HTTP/SSE | Backward compatibility only | Older clients |
Keep server logic (tools + resources) independent of transport so you can plug in stdio or HTTP in the entrypoint.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 143 lines · 52 tokens per session scan A a18e9a7f30b5
mcp-server-patterns is a skill published in the GitHub repository jiten-singh-shahi/salesforce-claude-code (16 stars, last pushed 2mo ago), licensed MIT. It adds 52 tokens to every session and 1,529 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
case-feed-send-email-action
Use when configuring the outbound Send Email quick action in Lightning Case Feed — creating the action in Setup on Case (Action Type = Send Email), attaching a default Custom email template, setting predefined To/CC/BCC values, wiring QuickAction.QuickActionDefaultsHandler Apex defaults, respecting the Lightning…
approval-process-apex-patterns
Programmatically driving Salesforce Approval Processes from Apex — Approval.process(ProcessSubmitRequest) to submit, ProcessWorkitemRequest to approve / reject / reassign, recall semantics, querying ProcessInstance and ProcessInstanceWorkitem to find pending approvals, and the bulk-submit / bulk-action error-row…
connected-apps-and-auth
Use when designing, reviewing, or troubleshooting Salesforce connected apps, External Client Apps, Named Credentials, External Credentials, and OAuth-based integration access. Triggers: 'connected app', 'OAuth flow', 'client credentials', 'JWT bearer', 'Named Credential', 'External Credential', 'integration user', 'IP…
api-contract-documentation
Produce or review API contract documentation for Salesforce integrations: versioning policy artifacts, request/response schema specs, error code catalogs, rate limit documentation, OpenAPI generation for sObjects. Trigger keywords: Salesforce API versioning policy, API end-of-life policy, document API endpoints, REST…
connected-app-troubleshooting
Troubleshooting Connected App OAuth flows — IP relaxation vs IP restriction, refresh token policy traps (default kills the connection on first refresh), session-revocation semantics, the OAuth error-code catalog (invalidgrant, invalidclientid, unsupportedgranttype), per-user vs admin-pre-approved flows, and the…
activity-and-task-patterns
Task and Event objects: polymorphic WhatId/WhoId, Activity object model, ActivityHistory vs OpenActivity, activity timeline customization, bulk task creation, Einstein Activity Capture boundaries. NOT for turning on EAC or calendar sync — use admin/einstein-activity-capture-setup. NOT for Email-to-Case — use…