johnplantada/jp-mcp-server
If you are the rightful owner of jp-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
JP MCP Server is a Model Context Protocol server that offers text search capabilities with fuzzy matching.
JP MCP Server
A Model Context Protocol (MCP) implementation providing AI persona capabilities with a shared, scalable architecture.
๐ Documentation
- - Comprehensive guide for using all features
- - GitHub Actions workflows and automation
- - Running and writing tests
- - Manual testing procedures
๐ Features
Persona Server
- AI persona management and switching
- Pre-configured personas (Expert Developer, Friendly Tutor, Creative Innovator, etc.)
- Custom persona creation and modification
- Persona generation from natural language descriptions
- Persistent storage of personas and settings
- NEW: Expired persona recovery with 24-hour grace period
- NEW: Persona blending for complex multi-domain tasks
- NEW: Usage statistics and smart recommendations
๐ฆ Installation
npm install
๐จ Build
npm run build
๐ฅ๏ธ Usage
Running Servers
# List available servers (does not start servers)
npm run server:list
# Persona server (development)
npm run dev:persona
# Persona server (production)
npm run start:persona
# Using the CLI runner
npm run server persona
๐๏ธ Architecture
The project uses a shared architecture pattern that promotes code reuse and consistency across MCP servers:
src/
โโโ base/ # Shared base classes
โ โโโ McpServerBase.ts
โโโ config/ # Configuration management
โ โโโ index.ts
โโโ servers/ # MCP servers
โ โโโ PersonaServer.ts # Persona server implementation
โ โโโ persona.register.ts # Registration-only (no side effects)
โ โโโ persona.ts # Executable entry point (starts server)
โโโ types/ # TypeScript type definitions
โ โโโ index.ts
โโโ utils/ # Shared utilities
โ โโโ logger.ts
โ โโโ errors.ts
โ โโโ schemaBuilder.ts
โ โโโ personaUtils.ts
โโโ registry/ # Server discovery and management
โ โโโ ServerRegistry.ts
โโโ cli/ # Command-line interface
โโโ runner.ts
Notes:
- The CLI imports the register-only file (e.g.,
persona.register.ts
) to avoid starting servers on import. - Executable entries (e.g.,
persona.ts
) guard startup behind an ESM main-check.
๐ญ Persona Server Tools
Core Persona Management
- list_personas - List all available AI personas (includes expired persona notifications)
- get_active_persona - Get the currently active persona
- switch_persona - Switch to a different AI persona
- get_persona_details - Get detailed information about a specific persona
- create_custom_persona - Create a new custom persona
- delete_persona - Delete a persona
- get_persona_prompt - Get the system prompt for the active persona
- generate_persona - Generate a new persona from a description
- update_persona - Update an existing persona
- set_default_persona - Set the default persona for server startup
Persona Blending & Management
- blend_personas - Create temporary blended personas combining multiple personas (1-hour TTL)
- suggest_persona - Get intelligent persona suggestions based on task context
- get_persona_stats - View usage statistics and analytics
- reset_persona_stats - Reset usage statistics
- get_smart_recommendations - Get AI-powered persona recommendations
Expired Persona Recovery
- list_expired_personas - List expired blended personas available for promotion (24-hour grace period)
- promote_expired_persona - Convert an expired blended persona into a permanent saved persona
Advanced Features
- save_ai_generated_persona - Save AI-generated personas to permanent storage
- request_persona_generation - Request AI generation of new personas
๐ Persona Storage & Expiration
Permanent Storage
Personas are stored in: ~/.mcp-personas.json
The file contains:
- Array of all persona objects
- Currently active persona ID
- Default persona ID for startup
Temporary Persona Management
- Blended Personas: Created with 1-hour expiration
- Expired Personas: Moved to 24-hour grace period after expiration
- Recovery Window: Users can promote expired personas to permanent storage
- Final Cleanup: Expired personas are permanently deleted after 24 hours
Expiration Lifecycle
- Active (1 hour) โ Blended persona is available for use
- Expired (24 hour grace) โ Persona moved to expired collection, available for promotion
- Permanent Deletion โ Expired persona is permanently removed from system
๐ Adding New Servers
- Create a server class extending
McpServerBase
:
import { McpServerBase } from '../base/McpServerBase.js';
export class MyNewServer extends McpServerBase {
protected setupTools(): void {
this.registerTool('my_tool', this.handleMyTool.bind(this), schema);
}
private async handleMyTool(args: any) {
return this.createResponse('Hello from my tool!');
}
}
- Create a register-only file (import-safe):
// src/servers/my-new-server.register.ts
import { MyNewServer } from './MyNewServer.js';
import { ServerRegistry } from '../registry/ServerRegistry.js';
ServerRegistry.register({
name: 'my-new-server',
description: 'Description of my server',
serverClass: MyNewServer,
config: { name: 'my-new-server', version: '1.0.0' },
entryPoint: 'dist/servers/my-new-server.js',
});
- Create an executable entry with ESM main-check:
// src/servers/my-new-server.ts
#!/usr/bin/env node
import { MyNewServer } from './MyNewServer.js';
import { ServerRegistry } from '../registry/ServerRegistry.js';
import { pathToFileURL } from 'url';
async function main() {
ServerRegistry.register({
name: 'my-new-server',
description: 'Description of my server',
serverClass: MyNewServer,
config: { name: 'my-new-server', version: '1.0.0' },
entryPoint: 'dist/servers/my-new-server.js',
});
const server = new MyNewServer({ name: 'my-new-server', version: '1.0.0' });
await server.run();
}
if (import.meta.url === pathToFileURL(process.argv[1]).href) {
main().catch(console.error);
}
- Update CLI runner to import the register file:
// src/cli/runner.ts
import '../servers/my-new-server.register.js';
- Add scripts to package.json:
{
"scripts": {
"dev:my-new-server": "tsx src/servers/my-new-server.ts",
"start:my-new-server": "node dist/servers/my-new-server.js"
}
}
๐ง Configuration
Server configurations are managed in src/config/index.ts
.
๐ ๏ธ Development
# Development mode (with hot reload)
npm run dev:persona
# List registered servers
npm run server:list
๐งช Integration with MCP Clients
Claude Code Configuration
{
"mcpServers": {
"persona": {
"command": "node",
"args": ["/path/to/jp-mcp-server/dist/servers/persona.js"]
}
}
}
Claude Desktop Configuration
{
"mcpServers": {
"persona": {
"command": "node",
"args": ["/Users/username/path/to/jp-mcp-server/dist/servers/persona.js"]
}
}
}
๐ Available Personas
Default personas available on first run:
- Expert Developer - Senior software engineer with deep technical expertise
- Friendly Tutor - Patient programming teacher for beginners
- Creative Innovator - Out-of-the-box thinker for innovative solutions
- Efficiency Optimizer - Performance and productivity specialist
- Security Guardian - Cybersecurity expert focused on secure coding
You can create unlimited custom personas tailored to your specific needs. See the for detailed instructions.
๐ CI/CD Pipeline
This project uses comprehensive GitHub Actions workflows for continuous integration, automated code review, and deployment. See for detailed documentation.
Workflows:
Workflow | Trigger | Purpose |
---|---|---|
CI | Push to main/feature branches | Tests on Node.js 18.x & 20.x, builds, coverage |
PR Validation | Pull requests | Validates, tests, and comments with results |
Code Review | PR with code changes | ESLint, security scan, complexity analysis |
Release | Version tags or manual | NPM publishing and GitHub releases |
Features:
- โ Automated Testing: Multi-version Node.js testing with 88.75% coverage
- ๐ค AI Code Review: GitHub Copilot integration for intelligent PR feedback
- ๐ Security Scanning: Automated detection of vulnerabilities and secrets
- ๐ Code Quality: ESLint analysis and complexity metrics
- ๐ฆ Automated Publishing: NPM and GitHub Packages release automation
- ๐ฌ PR Comments: Automated feedback with coverage and validation results
๐ค Contributing
- Follow the established architecture patterns
- Use the shared utilities (Logger, SchemaBuilder, ErrorHandler)
- Add proper TypeScript types
- Register your server in the ServerRegistry (register-only file)
- Ensure all tests pass (
npm test
) - Follow conventional commit format
- Update documentation
๐ License
MIT