Or: How I Learned to Stop Worrying and Love the JSON-RPC
"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it." - Terry Pratchett
In the grand tradition of the Unseen University's library system (though with considerably fewer orangutans), MCPM brings order to the chaos of MCP servers. Think of it as your very own Hex, but instead of ants and magical thinking engines, it uses TypeScript and good old-fashioned process management.
MCPM acts as a highly trained Igor between your AI assistant (be it Claude, Cursor, or some other thaumaturgical entity) and the various MCP servers lurking in the depths of your system. It:
- Spawns MCP servers with all the care of a master demonologist drawing protective circles
- Filters tools like the Patrician filters information - only what's necessary gets through
- Logs everything to
mcpm.log
, because as any good wizard knows, you always write it down - Manages configurations with the precision of a guild-certified assassin
First, you'll need to acquire the necessary components. No dried frog pills required, just:
git clone https://github.com/jsnanigans/mcpm.git
cd mcpm
npm install # Gathering the ingredients
npm run build # The actual transmutation
npm link # Binding the spell to your system
Now, create your grimoire (configuration file):
cp mcpm.config.example.json mcpm.config.json
Edit this file with the care you'd give to inscribing protective runes. One misplaced comma and BAM! - you're debugging instead of doing useful work.
Your mcpm.config.json
should look something like this:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your-token-here"
},
"tools": {
"allow": ["create_issue", "search_issues", "create_comment"]
}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/rincewind/spells"],
"logging": true
}
}
}
Each server entry is like a page in the Octavo - handle with care:
command
: The incantation to summon the serverargs
: Additional mystical parametersenv
: Environmental conditions (like phase of the moon, but for computers)tools.allow
: Which tools the server is permitted to wield (very important - you wouldn't give a student wizard access to the really dangerous spells)logging
: Whether to record this server's utterances for posterity
mcpm --server github --agent cursor --enable-logging
This summons the GitHub server, tells it that Cursor is the one asking, and records everything that happens (because you're prudent like that).
mcpm server list
Shows all configured servers, like reviewing your spell collection.
mcpm edit github
Launches an interactive tool selector. It's like having a conversation with a particularly helpful gargoyle about which tools you trust this server to use.
mcpm config
Reveals the location of your configuration file, in case you've forgotten where you put it (happens to the best of us).
mcpm log tail # Watch all logs
mcpm log tail -s github # Watch logs for a specific server
Add this to your Cursor settings.json, and it'll know how to summon MCPM:
{
"mcpServers": {
"github": {
"command": "mcpm",
"args": ["--server=github", "--agent=cursor"]
},
"filesystem": {
"command": "mcpm",
"args": ["--server=filesystem", "--agent=cursor"]
}
}
}
┌─────────┐ ┌──────┐ ┌─────────────┐
│ Cursor │ <-----> │ MCPM │ <-----> │ MCP Server │
└─────────┘ └──────┘ └─────────────┘
^ | ^
| v |
| Tool Filter |
| | |
| v |
+------------- Logging -----------------+
MCPM sits in the middle like a particularly clever golem, intercepting messages, filtering tools based on your configuration, and keeping detailed records of who said what to whom.
MCPM_ENABLE_LOGGING=true
- Enable logging globally (for when you really need to know what's happening)
The tool filtering system works like the Assassins' Guild pricing structure - very selective:
"tools": {
"allow": ["tool1", "tool2", "tool3"]
}
Or if you prefer the old ways:
"tools": {
"allow": "tool1 tool2 tool3"
}
Your server key doesn't exist. Run mcpm server list
to see what you've actually got.
- Check if the command exists:
which <command>
- Look at the logs:
mcpm log tail -s <server-name>
- Try running the server command directly to see what explodes
The tool filter might be too restrictive. Use mcpm edit <server>
to adjust.
In the words of the great philosopher Ly Tin Wheedle, "Complexity is just simplicity waiting to be discovered." MCPM takes the complexity of managing multiple MCP servers and makes it as simple as a conversation with Death (straightforward, no nonsense, gets the job done).
Found a bug? Want to add a feature? The guild doors are open. Just remember:
- All pull requests must pass the tests (like graduating from the Assassins' Guild, but less stabby)
- Keep the code clean (dirty code attracts bugs, and not the kind that make good listening devices)
- Document your changes (future you will thank present you)
MIT - which means you can do almost anything with it, except claim you wrote it when you didn't. That would be like claiming you invented the sandwich. Someone always did it first.
"Real stupidity beats artificial intelligence every time." - Terry Pratchett
But with MCPM, at least your MCP servers will be managed intelligently.