A Python server implementation for integrating with the PeakMojo API.
- Full integration with PeakMojo API endpoints
- Bearer token authentication
- Resource and tool-based access to PeakMojo functionality
- Automatic fallback to mock responses during development
pip install mcp-server-peakmojo
The server requires the following environment variables:
PEAKMOJO_API_KEY
: Your PeakMojo API key for authenticationPEAKMOJO_BASE_URL
(optional): PeakMojo API base URL (defaults to https://api.staging.readymojo.com)
You can also configure these via command line arguments:
python -m mcp_server_peakmojo --api-key YOUR_API_KEY --base-url YOUR_BASE_URL
The server provides access to the following PeakMojo resources:
- Users (
peakmojo://users
) - Personas (
peakmojo://personas
,peakmojo://personas/tags
,peakmojo://personas/search
) - Scenarios (
peakmojo://scenarios
) - Job Scenarios (
peakmojo://job_scenarios
) - Jobs (
peakmojo://jobs
) - Applications (
peakmojo://applications
) - Practices (
peakmojo://practices
) - Skills (
peakmojo://skills
) - Certificates (
peakmojo://certificates
)
The server provides the following tools for interacting with the PeakMojo API:
get_peakmojo_users
: Get list of all usersget_peakmojo_user
: Get user details by IDget_peakmojo_user_stats
: Get user statisticsupdate_peakmojo_user_stats
: Update user statistics
get_peakmojo_personas
: Get list of personasget_peakmojo_persona_tags
: Get persona tagssearch_peakmojo_personas
: Search for personascreate_peakmojo_persona
: Create a new persona
get_peakmojo_scenarios
: Get list of scenarioscreate_peakmojo_job_scenario
: Create a new job scenario
get_workspace_personas
: Get personas for a workspace
get_job
: Get job details
get_application
: Get application details
get_practice_messages
: Get practice messages
get_user_skills
: Get user skills
get_certificates
: Get list of certificatesget_certificate_skills
: Get skills for a certificateissue_user_certificate
: Issue a certificate to a useradd_certificate_skill_courses
: Add courses to a certificate skill
During development, if the API is not accessible, the server will automatically fall back to mock responses for each endpoint. This allows for development and testing without requiring a live API connection.
The server implements comprehensive error handling:
- Invalid API keys are logged with warnings
- Failed API requests fall back to mock responses
- HTTP errors are properly caught and logged
- All errors are returned as JSON responses with appropriate error messages
The Docker image is built for multiple platforms:
- Linux/amd64
- Linux/arm64
- Linux/arm/v7
docker pull buryhuang/mcp-server-peakmojo:latest
docker build -t mcp-server-peakmojo .
Basic usage with API key:
docker run \
-e PEAKMOJO_API_KEY=your_api_key_here \
-e PEAKMOJO_BASE_URL=https://api.staging.readymojo.com \
buryhuang/mcp-server-peakmojo:latest
To publish the Docker image for multiple platforms:
-
Create a new builder instance (if you haven't already):
docker buildx create --use
-
Build and push the image for multiple platforms:
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t peakmojo/mcp-server-peakmojo:latest --push .
-
Verify the image is available for the specified platforms:
docker buildx imagetools inspect peakmojo/mcp-server-peakmojo:latest
Configure the MCP server in your Claude Desktop settings:
{
"mcpServers": {
"peakmojo": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"PEAKMOJO_API_KEY=your_api_key_here",
"-e",
"PEAKMOJO_BASE_URL=https://api.staging.readymojo.com",
"peakmojo/mcp-server-peakmojo:latest"
]
}
}
}
If you want to run directly from the source code:
{
"mcpServers": {
"peakmojo": {
"command": "python",
"args": [
"-m",
"mcp_server_peakmojo",
"--api-key",
"your_api_key_here",
"--base-url",
"https://api.staging.readymojo.com"
]
}
}
}
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request