cisco-smb-mcp

jorcleme/cisco-smb-mcp

3.2

If you are the rightful owner of cisco-smb-mcp 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.

A Model Context Protocol (MCP) server for managing documents and prompt templates, providing a standardized interface for AI applications.

Tools
6
Resources
0
Prompts
0

cisco-smb-mcp

A Model Context Protocol (MCP) server for managing documents and prompt templates. This server provides a standardized interface for storing, retrieving, and managing documents and prompts that can be used by AI applications.

Features

Document Management

  • āœ… Create, read, update, and delete documents
  • āœ… Full-text search across document titles and content
  • āœ… Tag-based filtering and organization
  • āœ… Metadata support for custom properties
  • āœ… Unique document IDs with timestamps

Prompt Templates

  • āœ… Create and manage reusable prompt templates
  • āœ… Support for template variables with {{placeholder}} syntax
  • āœ… Argument definitions with descriptions and requirements
  • āœ… Tag-based organization
  • āœ… Built-in sample prompts (summarize, code_review)

MCP Protocol Support

  • āœ… Tools: Document and prompt management operations
  • āœ… Resources: Access to stored documents and prompts
  • āœ… Prompts: Template-based prompt generation with variable substitution
  • āœ… Standard MCP protocol compatibility

Note: This server uses the stable Server class from @modelcontextprotocol/sdk/server/index.js (SDK v1.17.1). While the MCP documentation may reference newer McpServer class from mcp.js, this implementation uses the proven stable API that's fully compatible with all MCP clients.

Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

# Install dependencies
npm install

# Build the project
npm run build

# Run the server
npm start

Development

# Run in development mode with hot reload
npm run dev

# Run tests with the simple client
npx tsx src/simple-client.ts

Usage

As MCP Server

The server can be used with any MCP-compatible client. Configure your client to connect to this server:

{
  "servers": {
    "document-prompt-server": {
      "type": "stdio",
      "command": "node",
      "args": ["dist/server.js"]
    }
  }
}

Available Tools

Document Tools
  • create_document - Create a new document
  • update_document - Update an existing document
  • get_document - Retrieve a document by ID
  • delete_document - Delete a document
  • search_documents - Search documents by content and tags
Prompt Tools
  • create_prompt - Create a new prompt template

Sample Usage

Creating a Document
await client.callTool("create_document", {
  title: "Meeting Notes",
  content: "Discussion about project roadmap...",
  tags: ["meeting", "project"],
  metadata: { date: "2024-01-15", attendees: 5 },
});
Searching Documents
await client.callTool("search_documents", {
  query: "project roadmap",
  tags: ["meeting"],
});
Creating a Prompt Template
await client.callTool("create_prompt", {
  name: "email_draft",
  description: "Draft a professional email",
  template:
    "Subject: {{subject}}\\n\\nDear {{recipient}},\\n\\n{{message}}\\n\\nBest regards,\\n{{sender}}",
  arguments: [
    { name: "subject", description: "Email subject", required: true },
    { name: "recipient", description: "Recipient name", required: true },
    { name: "message", description: "Email body", required: true },
    { name: "sender", description: "Sender name", required: true },
  ],
  tags: ["email", "communication"],
});

Available Resources

The server exposes several resource URIs:

  • document://<id> - Individual document content
  • prompt://<name> - Individual prompt template
  • documents://list - JSON list of all documents
  • prompts://list - JSON list of all prompt templates

Built-in Prompts

The server comes with sample prompts:

  1. summarize - Summarize text in specified number of sentences
  2. code_review - Review code and provide feedback

Project Structure

src/
ā”œā”€ā”€ server/
│   ā”œā”€ā”€ server.ts      # Main MCP server implementation
│   ā”œā”€ā”€ types.ts       # TypeScript type definitions and schemas
│   └── storage/
│       └── memory.ts  # In-memory storage implementations
└── client/
    ā”œā”€ā”€ simple-client.ts   # Test client for development
    └── client.ts          # Advanced client example (work in progress)

.vscode/
ā”œā”€ā”€ mcp.json           # VS Code MCP server configuration
ā”œā”€ā”€ launch.json        # Debug configurations
└── tasks.json         # Build and test tasks

.github/
└── copilot-instructions.md  # GitHub Copilot instructions

Development Notes

Storage

Currently uses in-memory storage for simplicity. For production use, consider implementing:

  • File-based storage
  • Database storage (SQLite, PostgreSQL, etc.)
  • External storage services

Error Handling

The server includes comprehensive error handling and validation using Zod schemas.

Extensibility

The modular design makes it easy to:

  • Add new storage backends
  • Implement additional tools
  • Extend document/prompt schemas
  • Add new resource types

VS Code Integration

This project includes VS Code configuration for debugging MCP servers:

  1. The .vscode/mcp.json file configures the server for VS Code MCP extension
  2. Use the VS Code MCP debugging features to test the server interactively

API Reference

Document Schema

{
  id: string;           // Unique identifier
  title: string;        // Document title
  content: string;      // Document content
  tags?: string[];      // Optional tags
  metadata?: object;    // Optional metadata
  createdAt: Date;      // Creation timestamp
  updatedAt: Date;      // Last update timestamp
}

Prompt Schema

{
  name: string;         // Unique prompt name
  description?: string; // Optional description
  template: string;     // Template with {{placeholders}}
  arguments?: Array<{   // Template arguments
    name: string;
    description?: string;
    required?: boolean;
  }>;
  tags?: string[];      // Optional tags
  createdAt: Date;      // Creation timestamp
  updatedAt: Date;      // Last update timestamp
}

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Run the test client to verify functionality
  6. Submit a pull request

License

ISC License - see LICENSE file for details.

Learn More