MCP
Connect your AI tools to sfp using MCP. Claude, GitHub Copilot, Cursor, and OpenCode can fetch Jira work items, manage review environments, and query pool configurations directly from your sfp instance — enabling end-to-end AI-assisted Salesforce development.
Endpoint
Your MCP endpoint is your sfp instance URL with /sfp/api/mcp appended:
https://your-company.flxbl.io/sfp/api/mcpPOST
/sfp/api/mcp
JSON-RPC 2.0 — tool calls, initialize
GET
/sfp/api/mcp
SSE stream for notifications
DELETE
/sfp/api/mcp
Close session
GET
/sfp/api/mcp/tools
REST — list available tools
Transport
Streamable HTTP
Protocol
MCP 2025-06-18
Auth
Authorization: Bearer <application-token>
Content-Type
application/json
Accept
application/json, text/event-stream
Quick Start
1. Create an application token
Generate a dedicated token for your MCP clients:
The token is only displayed once upon creation. Save it immediately in a secret manager or your CI/CD vault.
2. Configure your AI client
Pick your editor and add the configuration below. Replace the URL with your sfp instance and paste your token.
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Claude Desktop requires mcp-remote to connect to HTTP servers. The npx -y command installs it automatically.
Or add to .claude/settings.json:
Add to .vscode/mcp.json (per-project) or ~/.vscode/mcp.json (global):
Go to Settings > MCP Servers > Add:
Type:
Streamable HTTPURL:
https://your-company.flxbl.io/sfp/api/mcpHeaders:
Authorization: Bearer YOUR_APP_TOKEN
Or add to .cursor/mcp.json:
Add to opencode.json:
OpenCode supports {env:VAR} syntax to read tokens from environment variables, keeping secrets out of config files.
3. Verify
Ask your AI assistant: "List the available sandbox pools." If it returns pool data, you're connected.
Authentication
All MCP requests require a bearer token:
Application tokens authenticate with the Application role. Owner and Member JWT tokens also work. Rotate tokens regularly — use short expiration times (30-90 days) for CI/CD environments.
Available Tools
pools
poolsList sandbox and scratch org pool configurations.
action
Yes
Must be list_pools
repositoryIdentifier
No
Repository in owner/repo format
poolType
No
SANDBOX or SCRATCH_ORG
hasAssignmentRules
No
Filter by assignment rules (boolean)
review_envs
review_envsFetch and release review environments for PRs, issues, or users.
action
Yes
fetch_review_env or release_review_env
assignmentType
Yes (fetch)
pr, issue, user, or custom
assignmentId
Yes (fetch)
PR number, issue key, or username
repositoryIdentifier
Yes (fetch)
Repository in owner/repo format
poolTag
No
Specific pool tag
branch
No
Branch name for pool resolution
domains
No
Array of domains
domain
No
Single domain
expirationHours
No
1-720
isImmortal
No
boolean
metadata
No
object
override
No
boolean
work_items
work_itemsGet or list work items from your connected issue tracker (Jira, GitHub Issues).
action
Yes
get_work_item or list_work_items
projectIdentifier
No
owner/repo (platform derived from config)
id
No
Work item ID (for get_work_item)
status
No
Filter by status
assignee
No
Filter by assignee
type
No
Filter by type
maxResults
No
1-100 (default 50)
Debugging
Verify auth with curl
Test the MCP protocol handshake
Expected response:
MCP Inspector
The MCP Inspector provides a visual interface for testing tools:
Open http://localhost:6274 and enter your application token in the Bearer Token field.
Common Errors
401 Unauthorized
Missing or expired token
Create a new token with sfp server application-token create
Not Acceptable
Missing Accept header
Include Accept: application/json, text/event-stream (both required)
Connection refused
Instance unreachable from your network
Verify the URL and check that your network can reach your sfp instance
isError: true in tool response
Tool-level error (e.g., pool not found)
Check the error message; call list_pools to discover valid pools
Example Workflows
Implementing a Jira Issue
You: "Implement DP-6"
Agent:
work_items→get_work_item(id="DP-6")— reads acceptance criteriareview_envs→fetch_review_env(assignmentId="DP-6", ...)— gets a sandboxImplements changes, deploys, and validates
Pool Discovery
You: "What pools are available for flxbl-io/sf-core?"
Agent:
pools→list_pools(repositoryIdentifier="flxbl-io/sf-core")
Related
Last updated