newline-mcp-server

newline53/newline-mcp-server

3.3

If you are the rightful owner of newline-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Newline MCP server is a robust and flexible server designed to handle model context protocols efficiently.

Newline Model Context Protocol (MCP) Server

Let your AI agents interact with the Newline Banking API by using our MCP server.

The Newline Model Context Protocol (MCP) server provides a comprehensive set of tools that AI agents can use to interact with the Newline Banking API for managing synthetic accounts, transfers, customers, transactions, and other banking operations.

Connect to Newline's MCP Server

Cursor

Add the following to your ~/.cursor/mcp.json file. To learn more, see the Cursor documentation.

{
  "mcpServers": {
    "newline": {
      "command": "npx",
      "args": ["-y", "git+https://github.com/newline53/newline-mcp-server"],
      "env": {
        "NEWLINE_HMAC_KEY": "<<YOUR_HMAC_KEY>>",
        "NEWLINE_PROGRAM_ID": "<<YOUR_PROGRAM_ID>>",
        "NEWLINE_BASE_URL": "https://sandbox.newline53.com/api/v1"
      }
    }
  }
}

The code editor agent automatically detects all the available tools, calling the relevant tool when you post a related question in the chat.

VS Code

Add the following to your .vscode/mcp.json file in your workspace. To learn more, see the VS Code documentation.

Using promptStrings - this will prompt for input

{
  "inputs": [
    {
      "type": "promptString",
      "id": "hmac-key",
      "description": "Newline HMAC API key",
      "password": true
    },
    {
      "type": "promptString",
      "id": "program-id",
      "description": "Newline program ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "base-url",
      "description": "Newline API base URL",
      "default": "https://sandbox.newline53.com/api/v1"
    }
  ],
  "servers": {
    "newline": {
      "command": "npx",
      "args": ["-y", "git+https://github.com/newline53/newline-mcp-server"],
      "env": {
        "NEWLINE_HMAC_KEY": "${input:hmac-key}",
        "NEWLINE_PROGRAM_ID": "${input:program-id}",
        "NEWLINE_BASE_URL": "${input:base-url}"
      }
    }
  }
}

Using Environment Variables

{
  "servers": {
    "special-mcp-server": {
      "command": "npx",
      "args": ["git+https://github.com/newline53/newline-mcp-server"],
      "env": {
        "NEWLINE_HMAC_KEY": "${env:NEWLINE_HMAC_KEY}",
        "NEWLINE_PROGRAM_ID": "${env:NEWLINE_PROGRAM_ID}",
        "NEWLINE_BASE_URL": "${env:NEWLINE_BASE_URL}"
      }
    }
  }
}

Windsurf

Add the following to your ~/.codeium/windsurf/mcp_config.json file. To learn more, see the Windsurf documentation.

{
  "mcpServers": {
    "newline": {
      "command": "npx",
      "args": ["-y", "git+https://github.com/newline53/newline-mcp-server"],
      "env": {
        "NEWLINE_HMAC_KEY": "<<YOUR_HMAC_KEY>>",
        "NEWLINE_PROGRAM_ID": "<<YOUR_PROGRAM_ID>>",
        "NEWLINE_BASE_URL": "https://sandbox.newline53.com/api/v1"
      }
    }
  }
}

Claude Desktop

Add the following to your claude_desktop_config.json file. To learn more, see the Claude Desktop documentation.

{
  "mcpServers": {
    "newline": {
      "command": "npx",
      "args": ["-y", "git+https://github.com/newline53/newline-mcp-server"],
      "env": {
        "NEWLINE_HMAC_KEY": "<<YOUR_HMAC_KEY>>",
        "NEWLINE_PROGRAM_ID": "<<YOUR_PROGRAM_ID>>",
        "NEWLINE_BASE_URL": "https://sandbox.newline53.com/api/v1"
      }
    }
  }
}

CLI

Start the MCP server locally with this command:

NEWLINE_HMAC_KEY="<<YOUR_HMAC_KEY>>" \
NEWLINE_PROGRAM_ID="<<YOUR_PROGRAM_ID>>" \
NEWLINE_BASE_URL="https://sandbox.newline53.com/api/v1" \
npx -y git+https://github.com/newline53/newline-mcp-server

Or install globally:

npm install -g git+https://github.com/newline53/newline-mcp-server

# Run the server
NEWLINE_HMAC_KEY="<<YOUR_HMAC_KEY>>" \
NEWLINE_PROGRAM_ID="<<YOUR_PROGRAM_ID>>" \
NEWLINE_BASE_URL="https://sandbox.newline53.com/api/v1" \
newline

Configuration

The Newline MCP server requires the following environment variables:

VariableDescriptionRequiredDefault
NEWLINE_HMAC_KEYYour Newline API HMAC authentication keyYes-
NEWLINE_PROGRAM_IDYour Newline program identifierYes-
NEWLINE_BASE_URLNewline API base URLNohttps://sandbox.newline53.com/api/v1
https_proxy / HTTPS_PROXYHTTPS proxy URL (optional)No-

API Environments

  • Sandbox: https://sandbox.newline53.com/api/v1 (default)
  • Production: Contact Newline for production endpoint details

Security Considerations

We strongly recommend:

  • Never commit credentials to version control
  • Use environment variables or secure credential management
  • Regularly rotate your HMAC keys
  • Use different credentials for development and production environments
  • Enable human confirmation of tools when using the MCP server to avoid unintended operations

Tools

The server exposes 35+ MCP tools for interacting with the Newline Banking API. We recommend enabling human confirmation of tools and exercising caution when using the Newline MCP with other servers to avoid prompt injection attacks.

ResourceToolDescription
Authenticationget-newline-auth-tokenRetrieve current authentication token
Synthetic Accountsget-synthetic-account-typesList all available account types
get-synthetic-accountsList all synthetic accounts
get-synthetic-accountGet details of a specific account
create-synthetic-accountCreate a new synthetic account
delete-synthetic-accountsDelete a synthetic account
Transferslist-newline-transfersList all transfers
get-newline-transferGet details of a specific transfer
create-newline-transferCreate a new transfer (Wire, ACH, Instant Payment)
Customerslist-customersList all customers
get-customerGet details of a specific customer
Transactionslist-transactionsList all transactions
get-transactionGet details of a specific transaction
Poolslist-poolsList all pools
get-poolGet details of a specific pool
Productslist-productsList all products
get-productGet details of a specific product
Customer Productslist-customer-productsList all customer products
get-customer-productGet details of a specific customer product
Custodial Accountslist-custodial-accountsList all custodial accounts
get-custodial-accountGet details of a specific custodial account
Transaction Eventslist-transaction-eventsList all transaction events
get-transaction-eventGet details of a specific transaction event
Synthetic Line Itemslist-synthetic-line-itemsList all synthetic line items
get-synthetic-line-itemGet details of a specific synthetic line item
Custodial Line Itemslist-custodial-line-itemsList all custodial line items
get-custodial-line-itemGet details of a specific custodial line item
Virtual Reference Numberslist-virtual-reference-numbersList all virtual reference numbers
get-virtual-reference-numberGet details of a specific virtual reference number
Returnslist-returnsList all returns
get-returnGet details of a specific return
Combined Transferslist-combined-transfersList all combined transfers
get-combined-transferGet details of a specific combined transfer
Customer Activitieslist-customer-activitiesList all customer activities
get-customer-activityGet details of a specific customer activity

Docker Usage

You can also run the Newline MCP server in a Docker container.

Build the Docker Image

First, build the Docker image from the root directory of the project:

docker build -t newline-mcp-server:latest .

Run the Container

Then run the container with your credentials:

docker run \
  -e NEWLINE_HMAC_KEY="<<YOUR_HMAC_KEY>>" \
  -e NEWLINE_PROGRAM_ID="<<YOUR_PROGRAM_ID>>" \
  -e NEWLINE_BASE_URL="https://sandbox.newline53.com/api/v1" \
  newline-mcp-server:latest

MCP Configuration with Docker

Add the following to your MCP configuration:

{
  "servers": {
    "newline-docker": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e", "NEWLINE_HMAC_KEY=<<YOUR_HMAC_KEY>>",
        "-e", "NEWLINE_PROGRAM_ID=<<YOUR_PROGRAM_ID>>",
        "-e", "NEWLINE_BASE_URL=https://sandbox.newline53.com/api/v1",
        "newline-mcp-server:latest"
      ]
    }
  }
}

Example Usage

Here are some example prompts you can use with AI assistants connected to the Newline MCP server:

Account Management

  • "List all synthetic account types available"
  • "Show me all my synthetic accounts"
  • "Create a new checking account for customer John Doe"
  • "Get details for synthetic account with ID abc123"

Transfer Operations

  • "List all recent transfers"
  • "Create a wire transfer of $1000 from account A to account B"
  • "Show me the status of transfer xyz789"
  • "List all ACH transfers from last month"

Customer Information

  • "List all customers"
  • "Find customer details for john.doe@example.com"
  • "Show me all customers created this week"

Transaction Queries

  • "List all transactions for account abc123"
  • "Show me transaction details for txn_456"
  • "Get all transactions over $5000"

Resource Management

  • "List all available pools"
  • "Show me all products"
  • "Get custodial account information"

Troubleshooting

Authentication Errors

If you receive authentication errors, verify:

  • Your NEWLINE_HMAC_KEY is correct and active
  • Your NEWLINE_PROGRAM_ID matches your Newline program
  • You're using the correct NEWLINE_BASE_URL for your environment

Connection Issues

If the MCP server fails to connect:

  • Check your network connectivity
  • Verify any proxy settings if required (https_proxy environment variable)
  • Ensure the Newline API endpoint is accessible from your network

Tool Execution Errors

If tools fail to execute:

  • Verify you have the necessary permissions for the operation
  • Check that required parameters are provided
  • Review the error message for specific guidance
  • Ensure your API credentials have access to the requested resources

Autonomous Agents

If you're building agentic software, you can integrate the Newline MCP server into your autonomous workflows. The server supports standard MCP protocol and can be used with frameworks like:

  • OpenAI's Responses API
  • LangChain
  • AutoGPT
  • Custom agent implementations

Example integration with environment variables:

import os

mcp_config = {
    "command": "npx",
    "args": ["-y", "git+https://github.com/newline53/newline-mcp-server"],
    "env": {
        "NEWLINE_HMAC_KEY": os.getenv("NEWLINE_HMAC_KEY"),
        "NEWLINE_PROGRAM_ID": os.getenv("NEWLINE_PROGRAM_ID"),
        "NEWLINE_BASE_URL": os.getenv("NEWLINE_BASE_URL", "https://sandbox.newline53.com/api/v1")
    }
}

Development and Testing

Local Development

Clone the repository and install dependencies:

git clone https://github.com/newline53/newline-mcp-server.git
cd newline-mcp-server
npm install

Build the project:

npm run build

Run tests:

npm test

Running Locally

After building, you can run the server locally:

node dist/index.js

Or use the development configuration in your MCP client:

{
  "servers": {
    "newline-local": {
      "command": "node",
      "args": ["/path/to/newline-mcp-server/dist/index.js"],
      "env": {
        "NEWLINE_HMAC_KEY": "<<YOUR_HMAC_KEY>>",
        "NEWLINE_PROGRAM_ID": "<<YOUR_PROGRAM_ID>>",
        "NEWLINE_BASE_URL": "https://sandbox.newline53.com/api/v1"
      }
    }
  }
}

Features

  • 🔐 Secure Authentication: JWT-based authentication with HMAC signing
  • 🏦 Banking Operations: Comprehensive tools for account and transfer management
  • 👥 Customer Management: List and retrieve customer information
  • 💰 Transaction Tracking: Access transaction data and events
  • 📊 Resource Management: Manage pools, products, and custodial accounts
  • 🔄 Transfer Types: Support for Wire, ACH, and Instant Payment transfers
  • 🌐 Proxy Support: Configurable HTTPS proxy for corporate environments
  • 📝 Type Safety: Full TypeScript support with type definitions
  • ✅ Validation: Input validation using Zod schemas
  • 🛡️ Error Handling: Comprehensive error handling and logging

Support

For issues, questions, or feature requests:

License

Apache 2.0

See Also