Claude 3.5 Sonnet Model Context Protocol (MCP) Server Architect
Build Anthropic-compliant Model Context Protocol (MCP) servers with clean tool registrations, security rate limits, and typed response formatting.
Parametric Customizer & Compiler Live Tool
Adjust the variables below. The prompt code and API payload update dynamically in real time.
Identifier for the MCP server
Tools and resources exposed by server
You are a Principal Systems Architect specializing in Anthropic's Model Context Protocol (MCP) specification.
Architect a production-ready, type-safe MCP server for the following service:
- **Server Name**: {postgres-vector-mcp}
- **Target Language**: {TypeScript (Node.js ESM)}
- **Transport Type**: {stdio (Local Claude Desktop)}
- **Primary Capabilities**: {execute_read_query, list_database_tables, generate_pgvector_similarity_search}
### ARCHITECTURAL CONSTRAINTS:
1. **SDK Adherence**: Use official `@modelcontextprotocol/sdk` (TypeScript) or `mcp` (Python).
2. **Tool Registration**: Every tool must declare an exact JSON Schema / Zod schema with exhaustive parameter descriptions.
3. **Error Handling**: Catch downstream network failures and return standardized `isError: true` tool responses rather than crashing the stdio process.
4. **Security Boundary**: Validate all input paths and external IDs against directory traversal and SSRF attacks.
5. **Logging**: Do NOT use raw `console.log` on stdio transport as it corrupts JSON-RPC framing; use `server.notification` or stderr logger.
Generate the complete project files:
1. Package manifest (`package.json` or `pyproject.toml`)
2. Server entrypoint with tool registration
3. Client configuration snippet (`claude_desktop_config.json`) Seamlessly connect MCP servers and custom tools into Claude 3.5 Sonnet.
Leonardo Phoenix & Flux: Generate photorealistic studio assets with 150 daily free credits. Zero setup required.
πΈ Real Sample Outputs & Verified Results
Visual evidence and benchmark responses generated using this exact prompt formula.
π¬ Prompt Engineering Anatomy
Why this prompt consistently delivers high-tier results: technical parameter breakdown.
Stdio JSON-RPC Framing Guarantees stdout is reserved exclusively for framed JSON-RPC packets.
Zod Schema Extraction Extracts JSON Schemas directly from runtime Zod validators for 100% type synchronicity.
π¬ Frequently Asked Questions
Troubleshooting common edge cases, model incompatibilities, and best practices.
What is the Model Context Protocol (MCP)?
MCP is an open standard developed by Anthropic allowing AI models to securely connect to external data sources, developer tools, and proprietary databases.
Can I run this MCP server in Claude Desktop?
Yes, by adding the generated JSON block to your claude_desktop_config.json file, the tools become instantly usable in your chats.
Cursor AI & Claude 3.5 Sonnet Pro Bundle
Supercharge your workflow with instant codebase indexing, multi-file edits, and automated system rules.
Explore Related Coding & Architecture Prompts View all β
Claude 3.5 Sonnet Senior Staff Full-Stack Refactoring Architect
Specialized prompt framework for Claude 3.5 Sonnet and Claude 3.7. Transforms messy legacy codebases into modular, testable, high-performance systems with automated regression tests.
cursorCursor AI (.cursorrules) for Next.js 15, React 19 & Tailwind CSS
Stops Cursor from writing outdated Next.js 13 patterns, Pages Router syntax, or deprecated React hooks. Enforces strict TypeScript, Server Actions, and modular clean architecture.
deepseekDeepSeek-R1 Autonomous Deep Research & Synthesis Engine
DeepSeek-R1 chain-of-thought framework designed to force deep reflection, counterfactual auditing, and hypothesis testing before producing production-ready research reports.