PasteMyst MCP Server - Complete Documentation
A Model Context Protocol (MCP) server that brings PasteMyst functionality to AI assistants like Claude. This allows you to create, read, update, and delete code pastes directly through natural language conversations.
✨ Paste Management
👤 User Operations
🔧 Data & Utilities
🔐 Authentication
git clone https://github.com/yourusername/pastemyst-mcp.git
cd pastemyst-mcp
bun install
# or
npm install
bun run build
# or
npm run build
This will:
build/ directoryWindows: %AppData%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"pastemyst": {
"command": "node",
"args": ["C:/absolute/path/to/pastemyst-mcp/build/index.js"],
"env": {
"PASTEMYST_API_TOKEN": "your_api_token_here"
}
}
}
}
Add to your MCP configuration file (.cursor/mcp.json or similar):
{
"mcpServers": {
"pastemyst": {
"command": "node",
"args": ["/absolute/path/to/pastemyst-mcp/build/index.js"],
"env": {
"PASTEMYST_API_TOKEN": "your_api_token_here"
}
}
}
}
Note: API token is optional. Without it, you can still:
Restart Claude Desktop, Cursor, or VSCode to load the new MCP server.
Test the installation by asking: "What language uses the .py extension?"
If you get a response about Python, you're all set! 🎉
get_pasteRetrieve a paste by its ID.
id (string)create_pasteCreate a new paste on PasteMyst.
title (optional) - Paste titleexpiresIn (optional) - never, 1h, 2h, 10h, 1d, 2d, 1w, 1m, 1yisPrivate (optional) - BooleanisPublic (optional) - Display on profiletags (optional) - Array of stringspasties (required) - Array of code snippetsedit_pasteEdit an existing paste.
id (required) - Paste IDtitle (optional) - New titleisPrivate (optional) - Update privacyisPublic (optional) - Update profile visibilitytags (optional) - Update tagspasties (optional) - Complete array of updated pastiesdelete_pastePermanently delete a paste.
id (string)get_current_userGet your own profile information.
get_user_pastesList all your paste IDs.
get_userGet a user's public profile.
username (string)check_user_existsCheck if a username exists.
username (string)get_language_by_nameGet programming language info by name.
name (e.g., "Python", "JavaScript")get_language_by_extensionIdentify language from file extension.
extension (e.g., "py", "js", "ts")convert_expires_in_to_unix_timeConvert expiry duration to timestamp.
createdAt - Unix timestampexpiresIn - Duration stringPrompt: "Create a paste with a Python hello world program"
Result:
✅ Paste created successfully!
ID: abc123
URL: https://paste.myst.rs/abc123
Prompt: "Create a paste with a Python script and a requirements.txt file"
Result: Creates a paste with two pasties:
Prompt: "Create a private paste with my API keys configuration"
Note: Requires API token in config
Prompt: "Edit paste abc123 and change the title to 'Updated Code'"
Prompt: "Edit this paste to use async/await instead of callbacks"
Prompt: "Show me the paste with ID xyz789"
Prompt: "Get all my pastes"
Prompt: "Delete paste abc123"
Warning: This is permanent!
Prompt: "What language uses the .ts extension?" Answer: TypeScript
Prompt: "Tell me about the Python language in PasteMyst"
Prompt: "Does the user 'codemyst' exist?"
Prompt: "Show me information about user 'codemyst'"
Prompt: "What are my PasteMyst user details?"
Prompt: "Prepare documentation for my project and create a paste"
Prompt: "Create a paste with all popular sorting algorithms"
Prompt: "Create a paste that expires in 1 week with this code: [code]"
You: Create a paste with a Python fibonacci function
Claude: [Creates paste with basic fibonacci]
You: Edit it to use memoization
Claude: [Updates paste with optimized version]
You: Now add unit tests
Claude: [Adds test cases to the paste]
Limit: 5 requests per second Response: HTTP 429 (Too Many Requests)
Best Practices:
What you can do:
What you cannot do:
Full access to all features!
never - Permanent (default)1h - 1 hour2h - 2 hours10h - 10 hours1d - 1 day2d - 2 days1w - 1 week1m - 1 month1y - 1 year100+ programming languages including:
A paste consists of:
Each pasty has:
Problem: Claude/Cursor doesn't recognize the server
Solutions:
Problem: Cannot access a paste
Causes:
Solution:
Problem: Authentication failing
Solutions:
Problem: HTTP 429 errors
Solution:
Problem: bun run build fails
Solutions:
bun install --forceA: No, but you'll have limited functionality. Public paste creation and viewing works without auth.
A: No, you need auth to edit/delete any paste, even public ones you created.
A: Use get_user_pastes with auth, or check your PasteMyst profile.
A: Yes! Add multiple objects to the pasties array.
A: It's permanently deleted from PasteMyst servers.
A: Not yet - this feature isn't in the current API wrapper.
A: Yes, it's stored locally in your config and only sent to PasteMyst servers.
A: Yes! Any MCP-compatible client should work.
A: Pull latest changes and run bun run build again.
A: Check your MCP client's logs (Claude Desktop logs in console).
To run in development mode:
bun run dev
This shows detailed error messages and API responses.
pastemyst-mcp/
├── src/
│ └── index.ts # Main MCP server implementation
├── build/
│ ├── index.js # Compiled JavaScript
│ └── index.d.ts # TypeScript definitions
├── scripts/
│ └── fix-permissions.js # Post-build script
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── bun.lock # Lock file (bun)
├── README.md # Basic readme
├── EXAMPLES.md # Usage examples
└── claude_desktop_config.example.json # Config template
src/index.tsThe main server implementation with:
package.jsonDependencies:
@modelcontextprotocol/sdk - MCP protocol implementationpastemyst-ts - PasteMyst API wrapperzod - Schema validationDev dependencies:
typescript - TypeScript compiler@types/node - Node.js type definitionstsconfig.jsonTypeScript compiler options:
Runtime:
Development:
The build process:
tsc)build/ directoryThe server uses:
All tools follow the MCP specification and return structured responses with proper error handling.