# Clone the repositorygit clone https://github.com/your-org/your-mcp-server.gitcd your-mcp-server# Install dependenciesnpm install # or pip install -r requirements.txt# Build if necessarynpm run build# Run the servernpm start # or python -m your_server
Provides secure file operations with configurable access controls.
Copy
# Using NPX (recommended)npx -y @modelcontextprotocol/server-filesystem /Users/username/Documents# Using UV for Python versionuvx mcp-server-filesystem --base-directory /Users/username/Documents
# Install the PostgreSQL MCP servernpm install -g mcp-server-postgres# Or use with uvxuvx mcp-server-postgres --host localhost --port 5432 --database myapp
# Installnpm install -g @modelcontextprotocol/server-github# Set up environmentexport GITHUB_PERSONAL_ACCESS_TOKEN=your_token_here# Runmcp-server-github
Provides persistent memory using knowledge graphs:
Copy
# Install and runnpx -y @modelcontextprotocol/server-memory# With custom data directorynpx -y @modelcontextprotocol/server-memory --data-dir /path/to/memory
// server.tsimport { Server } from '@modelcontextprotocol/sdk/server/index.js';import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';const server = new Server( { name: 'my-custom-server', version: '1.0.0', }, { capabilities: { tools: {}, resources: {}, }, });// Add your tools and resources hereasync function main() { const transport = new StdioServerTransport(); await server.connect(transport);}main().catch(console.error);
Build and test:
Copy
# Build your servernpm run build# Test locallynode dist/server.js
# Clone your server repositorygit clone https://github.com/your-org/your-mcp-server.gitcd your-mcp-server# Install dependenciesnpm install# Build the projectnpm run build# Create a global link (optional)npm link# Test the installationyour-mcp-server --help
# Pull and run a server imagedocker run -d \ --name mcp-filesystem \ -v /host/path:/container/path \ -p 3000:3000 \ modelcontextprotocol/server-filesystem
# Add to your shell profile (.bashrc, .zshrc, etc.)export PATH="$HOME/.local/bin:$PATH"export PATH="/usr/local/bin:$PATH"# Reload your shellsource ~/.bashrc # or ~/.zshrc
# Firewall configuration (ufw)sudo ufw allow from 127.0.0.1 to any port 3000sudo ufw deny 3000# Or use iptablessudo iptables -A INPUT -s 127.0.0.1 -p tcp --dport 3000 -j ACCEPTsudo iptables -A INPUT -p tcp --dport 3000 -j DROP