
Mcp
- 12 installs
- 610 repo stars
- Updated June 26, 2026
- alsk1992/cloddsbot
mcp is a Claude Code skill that manages Model Context Protocol servers and integrates their tools, resources, and prompts into the clodds agent.
About
This skill manages Model Context Protocol (MCP) servers and their tools inside the clodds bot. A developer uses it to add, connect, and restart MCP servers, then list and call their tools, resources, and prompts. It exposes both chat commands and a TypeScript client with a registry for configured servers.
- Manage MCP servers via chat commands and a TypeScript client
- Connect over stdio or SSE transports and call tools directly
- Registry to add, list, start, and stop configured servers
Mcp by the numbers
- 12 all-time installs (skills.sh)
- Ranked #11,592 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
mcp capabilities & compatibility
- Capabilities
- mcp server management · tool integration · agent tooling
- Use cases
- orchestration
- Runs
- Runs locally
- Pricing
- Free
What mcp says it does
Manage Model Context Protocol (MCP) servers, external tools, and AI integrations.
transport: 'stdio', // 'stdio' | 'sse'
npx skills add https://github.com/alsk1992/cloddsbot --skill mcpAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 12 |
|---|---|
| repo stars | ★ 610 |
| Last updated | June 26, 2026 |
| Repository | alsk1992/cloddsbot ↗ |
What it does
Connect and manage MCP servers so an agent can call external tools like filesystem, GitHub, or Postgres.
Who is it for?
Wiring external MCP servers and their tools into the clodds agent
When should I use this skill?
You need to add, connect, or call an MCP server from the bot
What you get
Configured MCP servers are connected and their tools callable from chat or code.
By the numbers
- 5 popular MCP servers listed (filesystem, github, postgres, brave-search, puppeteer)
Files
MCP - Complete API Reference
Manage Model Context Protocol (MCP) servers, external tools, and AI integrations.
---
Chat Commands
Server Management
/mcp list List configured MCP servers
/mcp status Check server connection status
/mcp add <name> <command> Add new MCP server
/mcp remove <name> Remove MCP server
/mcp restart <name> Restart serverTool Interaction
/mcp tools List available tools
/mcp tools <server> Tools from specific server
/mcp call <server> <tool> [args] Call a tool directly
/mcp resources <server> List server resourcesConfiguration
/mcp config <server> View server config
/mcp config <server> set <key> <value> Update config
/mcp logs <server> View server logs---
TypeScript API Reference
Create MCP Client
import { createMCPClient } from 'clodds/mcp';
const mcp = createMCPClient({
// Transport
transport: 'stdio', // 'stdio' | 'sse'
// Server command
command: 'npx',
args: ['-y', '@modelcontextprotocol/server-filesystem'],
// Options
timeout: 30000,
retries: 3,
});Connect to Server
// Connect
await mcp.connect();
// Check status
const status = mcp.getStatus();
console.log(`Connected: ${status.connected}`);
console.log(`Server: ${status.serverInfo?.name}`);
console.log(`Version: ${status.serverInfo?.version}`);
// Disconnect
await mcp.disconnect();List Tools
// Get available tools
const tools = await mcp.listTools();
for (const tool of tools) {
console.log(`${tool.name}: ${tool.description}`);
console.log(` Input schema: ${JSON.stringify(tool.inputSchema)}`);
}Call Tool
// Call a tool
const result = await mcp.callTool({
name: 'read_file',
arguments: {
path: '/path/to/file.txt',
},
});
console.log(`Result: ${JSON.stringify(result)}`);List Resources
// Get available resources
const resources = await mcp.listResources();
for (const resource of resources) {
console.log(`${resource.uri}: ${resource.name}`);
console.log(` Type: ${resource.mimeType}`);
}
// Read a resource
const content = await mcp.readResource('file:///path/to/file.txt');
console.log(content);List Prompts
// Get available prompts
const prompts = await mcp.listPrompts();
for (const prompt of prompts) {
console.log(`${prompt.name}: ${prompt.description}`);
}
// Get prompt content
const prompt = await mcp.getPrompt('code-review', {
code: 'function add(a, b) { return a + b; }',
});
console.log(prompt.messages);MCP Registry
import { createMCPRegistry } from 'clodds/mcp';
const registry = createMCPRegistry({
configPath: './mcp-servers.json',
});
// Add server
registry.addServer({
name: 'filesystem',
command: 'npx',
args: ['-y', '@modelcontextprotocol/server-filesystem', '/home/user'],
env: {},
});
// List servers
const servers = registry.listServers();
// Get server
const server = registry.getServer('filesystem');
// Remove server
registry.removeServer('filesystem');
// Start all servers
await registry.startAll();
// Stop all servers
await registry.stopAll();---
Popular MCP Servers
| Server | Purpose | Install |
|---|---|---|
| filesystem | File operations | @modelcontextprotocol/server-filesystem |
| github | GitHub API | @modelcontextprotocol/server-github |
| postgres | Database queries | @modelcontextprotocol/server-postgres |
| brave-search | Web search | @modelcontextprotocol/server-brave-search |
| puppeteer | Browser automation | @modelcontextprotocol/server-puppeteer |
---
Server Configuration
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user"],
"env": {}
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "ghp_..."
}
}
}
}---
CLI Commands
# List MCP servers
clodds mcp list
# Add MCP server
clodds mcp add filesystem "npx -y @modelcontextprotocol/server-filesystem /home"
# Test server connection
clodds mcp test filesystem
# Remove server
clodds mcp remove filesystem---
Best Practices
1. Use official servers — Start with well-tested MCP servers 2. Limit file access — Restrict filesystem server to specific directories 3. Secure credentials — Use env vars for tokens, not command args 4. Monitor logs — Check server logs for errors 5. Timeout handling — Set appropriate timeouts for slow operations
/**
* MCP CLI Skill
*
* Commands:
* /mcp list - List MCP servers
* /mcp connect - Connect all configured servers
* /mcp disconnect <name> - Disconnect a server
* /mcp tools [server] - List available tools
* /mcp call <tool> [args] - Call a tool
* /mcp health - Check server health
*/
import { logger } from '../../../utils/logger';
let registryInstance: any = null;
function helpText(): string {
return `**MCP Commands**
/mcp list - List configured MCP servers
/mcp connect - Connect all configured servers
/mcp disconnect <name> - Disconnect a server
/mcp tools [server] - List available tools
/mcp call <server:tool> [json] - Call a tool with JSON args
/mcp health - Check health of all servers
**Examples:**
/mcp list
/mcp tools
/mcp call myserver:search {"query": "test"}
/mcp health`;
}
async function execute(args: string): Promise<string> {
const parts = args.trim().split(/\s+/);
const cmd = parts[0]?.toLowerCase() || 'help';
try {
const {
createMcpRegistry,
loadMcpConfig,
initializeFromConfig,
} = await import('../../../mcp/index');
if (!registryInstance) {
registryInstance = createMcpRegistry();
const config = loadMcpConfig();
initializeFromConfig(registryInstance, config);
}
const registry = registryInstance;
switch (cmd) {
case 'list':
case 'ls': {
const servers = registry.listServers();
if (servers.length === 0) {
return '**MCP Servers**\n\nNo MCP servers configured.\n\nAdd servers to `.mcp.json` or `~/.config/clodds/mcp.json`:\n```json\n{\n "mcpServers": {\n "my-server": {\n "command": "npx",\n "args": ["-y", "@my/mcp-server"]\n }\n }\n}\n```';
}
let output = `**MCP Servers** (${servers.length})\n\n`;
for (const name of servers) {
const client = registry.getClient(name);
const status = client?.connected ? 'connected' : 'disconnected';
const info = client?.serverInfo;
output += `- **${name}** [${status}]`;
if (info) {
output += ` (${info.name} v${info.version}, protocol ${info.protocolVersion})`;
}
output += '\n';
}
return output;
}
case 'connect': {
const servers = registry.listServers();
if (servers.length === 0) {
return 'No MCP servers configured. Add servers to `.mcp.json`.';
}
await registry.connectAll();
let output = '**MCP Connect Results**\n\n';
for (const name of servers) {
const client = registry.getClient(name);
const status = client?.connected ? 'connected' : 'failed';
output += `- ${name}: ${status}`;
if (client?.serverInfo) {
output += ` (${client.serverInfo.name} v${client.serverInfo.version})`;
}
output += '\n';
}
return output;
}
case 'disconnect': {
const name = parts[1];
if (!name) return 'Usage: /mcp disconnect <name>';
const client = registry.getClient(name);
if (!client) {
return `Server **${name}** not found. Use \`/mcp list\` to see servers.`;
}
await client.disconnect();
return `Disconnected from **${name}**.`;
}
case 'tools': {
const serverFilter = parts[1];
// Need to connect first to list tools
await registry.connectAll();
const allTools = await registry.getAllTools();
const tools = serverFilter
? allTools.filter((t: any) => t.server === serverFilter)
: allTools;
if (tools.length === 0) {
return serverFilter
? `No tools found for server **${serverFilter}**. Check connection with \`/mcp health\`.`
: 'No tools available. Connect MCP servers first with `/mcp connect`.';
}
let output = `**MCP Tools** (${tools.length})\n\n`;
let currentServer = '';
for (const tool of tools) {
if (tool.server !== currentServer) {
currentServer = tool.server;
output += `\n**${currentServer}:**\n`;
}
output += ` - \`${tool.server}:${tool.name}\``;
if (tool.description) output += ` - ${tool.description}`;
output += '\n';
if (tool.inputSchema?.properties) {
const params = Object.keys(tool.inputSchema.properties);
const required = tool.inputSchema.required || [];
output += ` Params: ${params.map(p => required.includes(p) ? `${p}*` : p).join(', ')}\n`;
}
}
return output;
}
case 'call': {
const toolName = parts[1];
if (!toolName) return 'Usage: /mcp call <server:tool> [json args]\n\nExample: /mcp call myserver:search {"query": "test"}';
// Parse JSON args from remaining parts
const argsStr = parts.slice(2).join(' ');
let toolArgs: Record<string, unknown> = {};
if (argsStr) {
try {
toolArgs = JSON.parse(argsStr);
} catch {
return `Invalid JSON arguments: ${argsStr}\n\nProvide args as valid JSON, e.g.: {"key": "value"}`;
}
}
await registry.connectAll();
const result = await registry.callTool(toolName, toolArgs);
if (result.isError) {
return `**Tool Error**\n\n${result.content.map((c: any) => c.text || '').join('\n')}`;
}
let output = `**Tool Result: ${toolName}**\n\n`;
for (const c of result.content) {
if (c.type === 'text' && c.text) output += c.text + '\n';
else if (c.type === 'resource') output += `[Resource: ${c.uri}]\n`;
else if (c.type === 'image') output += `[Image: ${c.mimeType}]\n`;
}
return output;
}
case 'health': {
const servers = registry.listServers();
if (servers.length === 0) {
return 'No MCP servers configured.';
}
await registry.connectAll();
const health = await registry.checkHealth();
let output = '**MCP Server Health**\n\n';
for (const [name, healthy] of Object.entries(health)) {
output += `- ${name}: ${healthy ? 'healthy' : 'unhealthy'}\n`;
}
return output;
}
default:
return helpText();
}
} catch (error) {
return `Error: ${error instanceof Error ? error.message : String(error)}`;
}
}
export default {
name: 'mcp',
description: 'Model Context Protocol server management and tool integration',
commands: ['/mcp'],
handle: execute,
};
Related skills
FAQ
What transports does the MCP client support?
The client supports stdio and sse transports, configured on createMCPClient.
How do I add a new MCP server?
Use /mcp add <name> <command> or registry.addServer, or add it to mcp-servers.json.