@feedmob/samsung-reporting
v0.1.2
Published
MCP server for Samsung API
Downloads
40
Readme
Samsung Reporting MCP Server
Node.js server implementing Model Context Protocol (MCP) for Samsung API.
Features
This server provides the following tools:
get_samsung_content_metrics: Fetch content metrics from Samsung API for a specific date range.- Input Parameters:
startDate(string, required): Start date for the report inYYYY-MM-DDformat.endDate(string, required): End date for the report inYYYY-MM-DDformat.metricIds(array of strings, optional): Optional array of metric IDs to fetch. Defaults to standard metrics if not provided:total_unique_installs_filterrevenue_totalrevenue_iap_order_countdaily_rat_scoredaily_rat_volumne
- Output: Returns the content metrics data as JSON.
- Input Parameters:
Setup
Environment Variables: Before running the server, you need to set the following environment variables:
export SAMSUNG_ISS='your_samsung_issuer' export SAMSUNG_PRIVATE_KEY='your_samsung_private_key' export SAMSUNG_CONTENT_ID='your_samsung_content_id'Required Environment Variables:
SAMSUNG_ISS: Samsung issuer identifier for JWT authenticationSAMSUNG_PRIVATE_KEY: Private key for JWT signing (RS256 algorithm)SAMSUNG_CONTENT_ID: Content ID for which to fetch metrics
Usage with Claude Desktop
Make sure you have installed and updated to the latest version of Claude for Desktop.
Open the Claude for Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
Add the Samsung MCP server to the
mcpServersconfiguration section:{ "mcpServers": { "samsung": { "command": "npx", "args": [ "-y", "@feedmob/samsung-reporting" ], "env": { "SAMSUNG_ISS": "your_samsung_issuer", "SAMSUNG_PRIVATE_KEY": "your_samsung_private_key", "SAMSUNG_CONTENT_ID": "your_samsung_content_id" } } } }
Authentication
The server uses JWT (JSON Web Token) authentication with RS256 algorithm to authenticate with Samsung API:
- Generates a JWT token using the provided private key and issuer
- Uses the JWT to obtain an access token from Samsung's auth endpoint
- Uses the access token for subsequent API calls to fetch content metrics
The JWT token includes:
iss: Samsung issuer identifierscopes:['publishing', 'gss']exp: Token expiration (20 minutes from issue time)iat: Token issue time
Development
- Clone the repository.
- Navigate to the
src/samsung-reportingdirectory. - Install dependencies:
npm install - Set the required environment variables (
SAMSUNG_ISS,SAMSUNG_PRIVATE_KEY, andSAMSUNG_CONTENT_ID). - Build the project:
npm run build - Run the server directly:
node dist/index.js
License
MIT
