Stern Philosophical Mentor MCP server

Provides a philosophical mentor named Stern who combines rationalist thinking, stoic philosophy, and psychological insights with smart contract-based accountability for personal growth commitments.
Back to servers
Setup instructions
Provider
gh-Akrasia0
Release date
Apr 29, 2025
Language
TypeScript
Package
Stats
1.9K downloads
1 star

S/MCP (Stern Model Context Protocol) is a powerful MCP server that provides access to Stern, a philosophical AI mentor. This mentor helps humans achieve their potential through guidance, wisdom, and smart contract accountability on Solana, combining rationalist thinking with stoic philosophy to provide meaningful mentorship.

Installation

To set up the S/MCP server, follow these steps:

  1. Clone the repository:

    git clone <repository-url>
    cd s-mcp
    
  2. Install dependencies:

    bun install
    
  3. Set up environment variables:

    cp .env.example .env
    

    Then edit the .env file to add your OpenAI API key:

    OPENAI_API_KEY=your_openai_api_key_here
    
  4. Build the server:

    bun run build
    

Running the Server

Start the MCP server with this command:

bun run start

This launches the server in stdio mode, enabling communication with MCP clients.

Client Integration

You can integrate the S/MCP server with any MCP client. Here's an example using the MCP SDK:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
import { spawn } from "child_process";

// Start the MCP server as a child process
const serverProcess = spawn("node", ["path/to/dist/main.js"], {
    stdio: ["pipe", "pipe", "pipe"],
});

// Create a client that communicates with the server via stdio
const transport = new StdioClientTransport({
    stdin: serverProcess.stdin,
    stdout: serverProcess.stdout,
});

const client = new Client();
await client.connect(transport);

// Send a message to Stern
const result = await client.callTool("msg_stern", {
    message: "I want to learn programming but I keep procrastinating",
});

// Display Stern's response
console.log(result.content[0].text);

// Disconnect from the server
await client.disconnect();
serverProcess.kill();

Example Usage

An example script is provided in the examples directory:

node examples/use-stern.js

This demonstrates how to connect to the server, list available tools, and send a message to Stern.

Using the msg_stern Tool

The primary tool available is msg_stern, which allows you to communicate with Stern.

Input Format

{
    "message": "Your message to Stern"
}

Output Format

{
    "content": [
        {
            "type": "text",
            "text": "Stern's response to your message"
        }
    ]
}

Stern's Guidance Approach

Stern provides mentorship through:

  • Philosophical Guidance: Drawing from stoic wisdom and rationalist thinking
  • Smart Contract Accountability: Creating Solana-based contracts where users stake tokens on their commitments
  • Personalized Mentorship: Providing tailored advice based on individual goals and challenges
  • Deep Conversations: Engaging in meaningful dialogue that reveals underlying motivations

System Requirements

  • Bun (JavaScript runtime and package manager)
  • OpenAI API key (set as OPENAI_API_KEY environment variable)

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "s-mcp" '{"command":"npx","args":["-y","s-mcp"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "s-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "s-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "s-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "s-mcp"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later