Sellfern provides a Model Context Protocol (MCP) server that exposes your orders, analytics, and fulfillment data as native tools for AI assistants. Once connected, Claude Desktop can list orders, pull profit summaries, update statuses, and assign suppliers — all from a natural language conversation, with no custom code on your side.Documentation Index
Fetch the complete documentation index at: https://docs.sellfern.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Node.js 18 or later installed on the machine running the MCP server
- A Sellfern API token with the scopes required by the tools you want to use (see the token creation step below)
- Claude Desktop, Cursor, OpenCode, or another MCP-compatible client
Setup
Build the MCP server
From the root of the Sellfern project directory, build the MCP server:This produces
mcp-server/build/index.js, the entry point you will reference in the config file.Locate your client's config file
The config file path depends on your operating system:
Create the file if it does not exist.
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Add the Sellfern MCP server config
Paste the following into Replace
claude_desktop_config.json, merging with any existing mcpServers keys if the file already has content:/absolute/path/to/ with the real path to the cloned repository on your machine.| Field | Description |
|---|---|
command | Runtime to use — node for the JS MCP server |
args | Absolute path to the compiled entry point |
env.SELLFERN_API_URL | Base URL for the Sellfern REST API; use http://localhost:3000 for local development |
env.SELLFERN_API_TOKEN | Your bearer token — must start with sk_live_ |
Create an API token in Sellfern
In Sellfern, go to Settings → API Tokens and create a new token. Select the scopes your agent needs:
orders:read— read order dataorders:write— update order fieldsorders:status:write— change order statusanalytics:read— access revenue and profit summariesfulfillment:read— view the fulfillment queuefulfillment:write— assign suppliers
sk_live_... value and paste it as SELLFERN_API_TOKEN in the config file.Available MCP tools
Once connected, your AI assistant can call any of these tools:| Tool | Description |
|---|---|
list_orders | List orders with optional filters: status, store ID, search query, date range, and pagination |
get_order | Fetch full detail for a single order by ID |
update_order_status | Update the status of an order, optionally adding a tracking number |
bulk_update_order_status | Update multiple order statuses in a single call |
add_order_note | Append a note to an order |
get_analytics_summary | Revenue, order count, COGS, gross profit, and margin for a given period (last_7_days, last_30_days, mtd, ytd) |
list_fulfillment_queue | List orders currently awaiting a fulfillment action |
assign_supplier | Assign a supplier to one or more orders |
Other compatible clients
The MCP server uses the stdio transport by default, which works with Claude Desktop and Cursor. It also supports an HTTP/SSE transport for clients that connect over a network:http://localhost:8765/sse.
Troubleshooting
MCP server not found
MCP server not found
Verify that the path in
args points to mcp-server/build/index.js and that you ran npm run build in the mcp-server/ directory. The file must exist before you start the client.401 Unauthorized errors
401 Unauthorized errors
403 missing_scope errors
403 missing_scope errors
The token you are using does not have the scope required by the tool. Go to Settings → API Tokens, rotate the token, and add the missing scope. Common scopes needed:
orders:read, analytics:read, fulfillment:read.