About NextApp Payments MCP Server Demo
A demo project showing how to expose MongoDB Atlas payment data to MCP clients. It uses both a resource and tools to provide completed and all payment records, illustrating a database-backed MCP server implementation.
Key features
- 01Connect to MongoDB Atlas
- 02Expose completed payments as a resource
- 03Provide tools for completed and all payments
- 04Integrate with MCP Inspector and Claude AI
- 05Return data in JSON
Use cases
- 01Learn to build a database MCP server
- 02Inspect payment data in MCP Inspector
- 03Let Claude AI retrieve and analyze payment records
MCP support
The server exposes payment data through the `payments://done` resource and the `get_completed_payments` and `get_all_payments` tools for MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMENextApp Payments MCP Server Demo
A demonstration project showcasing how to implement a Model Context Protocol (MCP) server that exposes MongoDB payment data through both MCP Inspector and Claude AI integration. This project serves as an example of how to use the MCP protocol to expose database resources through a standardized interface.
📝 For a detailed, step-by-step guide on building this MCP server from scratch, check out my comprehensive blog post.
Project Overview
This demo project demonstrates:
- Implementation of an MCP server using the official SDK
- Connection to a specific MongoDB Atlas database
- Exposure of payment data through both MCP Resources and Tools
- Integration with both MCP Inspector and Claude AI
- How LLMs can interact with structured database data
Features
MCP Resources
- URI:
payments://done - Purpose: Retrieves payment records where
done: true - Response Format: JSON
- MIME Type:
application/json
MCP Tools
-
get_completed_payments
- Description: Retrieves all payments where done is true
- Input: No parameters required
- Output: JSON array of completed payments
-
get_all_payments
- Description: Retrieves all payments from the database
- Input: No parameters required
- Output: JSON array of all payments
MCP Inspector View

The image above shows the MCP Inspector interface displaying the payment records retrieved from MongoDB Atlas through the MCP server. MCP Inspector is a developer tool that helps verify and debug MCP server implementations.
Claude AI Integration

The image above demonstrates Claude AI successfully:
- Connecting to the MCP server
- Accessing the payments resource and tools
- Analyzing payment data
- Presenting structured results with total amounts, date ranges, and key observations
Setting Up Your MCP Resource in Claude Desktop
If you have created your own MCP server and want to use it with Claude Desktop:
-
Locate Claude Desktop Config
- Windows:
C:\Users\<username>\AppData\Roaming\claude\claude_desktop_config.json - macOS:
~/Library/Application Support/claude/claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json
- Windows:
-
Configure Your MCP Server
{ "mcpServers": { "YourServerName": { "transport": "stdio", "command": "node", "args": ["path/to/your/server.js"], "env": { "YOUR_ENV_VARIABLE": "your_value" }, "cwd": "path/to/your/project" } } }Replace:
YourServerName: A unique name for your serverpath/to/your/server.js: Full path to your server fileYOUR_ENV_VARIABLE: Any environment variables your server needs
-
Verify Connection
- Open Claude Desktop
- Go to Settings → Developer
- Your server should appear with a "running" status
-
Use Your Resource or Tools
# Using Resource Use the MCP resource payments://done and [your query] # Using Tools Use the MCP tool get_completed_payments to show me all successful payments Use the MCP tool get_all_payments to show me all payments in the system
Implementation Details
Technologies Used
- MCP SDK: For protocol handling and resource/tool exposure
- MongoDB Driver: For database access and query execution
- Claude Desktop: For LLM integration and natural language querying
Error Handling
The implementation includes error handling for:
- MongoDB connection issues
- Query execution errors
- Connection closure errors
- JSON-formatted logging for Claude Desktop compatibility
Important Notes
This is a demonstration project showing:
- How to implement an MCP server
- How to expose MongoDB data as both MCP resources and tools
- Multiple ways to access the data:
- Through MCP Inspector (for developers)
- Through Claude AI (for end users)
- Through direct tool calls
- How LLMs can interact with structured data
The MongoDB connection and resource configurations are specific to this demo. You'll need to modify them for your use case.
Resources
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.