mcpField
N
NextApp Payments MCP Server Demo

NextApp Payments MCP Server Demo

Local
github.com/Denyme24Developer Tools0Updated 73w ago

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

  1. 01Connect to MongoDB Atlas
  2. 02Expose completed payments as a resource
  3. 03Provide tools for completed and all payments
  4. 04Integrate with MCP Inspector and Claude AI
  5. 05Return data in JSON

Use cases

  1. 01Learn to build a database MCP server
  2. 02Inspect payment data in MCP Inspector
  3. 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.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

NextApp 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
  1. get_completed_payments

    • Description: Retrieves all payments where done is true
    • Input: No parameters required
    • Output: JSON array of completed payments
  2. get_all_payments

    • Description: Retrieves all payments from the database
    • Input: No parameters required
    • Output: JSON array of all payments

MCP Inspector View

MCP Inspector showing payment records

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

Claude LLM Result

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:

  1. 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
  2. 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 server
    • path/to/your/server.js: Full path to your server file
    • YOUR_ENV_VARIABLE: Any environment variables your server needs
  3. Verify Connection

    • Open Claude Desktop
    • Go to Settings → Developer
    • Your server should appear with a "running" status
  4. 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:

  1. How to implement an MCP server
  2. How to expose MongoDB data as both MCP resources and tools
  3. Multiple ways to access the data:
    • Through MCP Inspector (for developers)
    • Through Claude AI (for end users)
    • Through direct tool calls
  4. 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

Markdown supported

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.