Model Context Protocol (MCP) Guide
Overview
The Model Context Protocol (MCP) is an open standard for connecting AI models to external tools and data sources using a secure, structured interface. MCP standardizes communication through a JSON-RPC protocol, enabling predictable request/response patterns and reducing custom integration overhead.
MCP uses a tools/list and tools/call method structure for tool discovery and invocation, replacing older method names like listTools and invokeTool.
Key Benefits
MCP is designed to simplify and secure the way AI models interact with external systems. This section outlines the main benefits of MCP, including simpler integrations and better cross-platform interoperability.
- Safer API Access for AI: Credentials stay on the MCP server. Clients invoke permissioned tools under standard authentication, reducing exposure of raw API keys and endpoints.
- Consistent Interface: All tools follow the same JSON‑RPC pattern, tools/list for discovery and tools/call for invocation, regardless of which client is calling them.
- Extensible Design: Add new tools or target environments (sandbox, staging, production) without changing the client integration pattern.
- Interoperability: Works across MCP‑compatible frameworks and agent platforms (e.g., Claude Desktop, VS Code MCP extensions, Cursor, Windsurf, and custom clients), providing interoperability.
Capabilities
- Financial Services: Allow models to retrieve account data or transaction details through banking APIs.
- E-commerce: Enable models to query product catalogs or update inventory.
- Customer Support: Integrate with CRM systems for context-aware responses.
- Data Analysis: Provide models with structured datasets for reporting or analytics.
Architecture
Understanding how MCP works under the hood is key to successful implementation. This section explains the JSON-RPC communication model, the roles of clients and servers, and the structure of requests and responses. MCP communication follows the JSON-RPC 2.0 standard with two primary roles:
- Client: The AI model or application initiating requests.
- Server: The external tool or service providing responses.
Core methods include:
{ "jsonrpc":"2.0","id":1,"method":"tools/list","params":{} }
{ "jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"create-newline-transfer","arguments":{"type":"wire","amount":1000}}}Servers may also send notifications like tools/list_changed when tool availability changes.
Messages
Communication occurs through JSON-based messages.
Each message includes:
- type: Indicates whether it’s a request or response.
- method: The operation being performed (e.g., listTools, invokeTool).
- params: Input parameters for the operation.
- id: A unique identifier for tracking responses.
Installation & Configuration
Once you understand the architecture, the next step is setting up MCP in your environment. Here, we walk through installation and configuration for popular clients like VS Code, Claude Desktop, Cursor, and Windsurf. MCP servers can be registered in multiple clients. You can access the MCP server source code and installation scripts on GitHub. Use the following examples:
VS Code Installation
Add the following to your .vscode/mcp.json:
{
"servers": {
"newline": {
"type": "stdio",
"command": "npx",
"args": ["-y","git+https://github.com/newline53/newline-mcp-server"],
"env": {
"NEWLINE_HMAC_KEY": "${input:hmac}",
"NEWLINE_PROGRAM_ID": "${input:program}",
"NEWLINE_BASE_URL": "${input:baseUrl}"
}
}
},
"inputs": [
{"type":"promptString","id":"hmac","description":"Newline HMAC API key","password":true},
{"type":"promptString","id":"program","description":"Newline program ID","password":true},
{"type":"promptString","id":"baseUrl","description":"Newline API base URL","default":"https://sandbox.newline53.com/api/v1"}
]
}Claude Desktop Installation
Add the following to your claude_desktop_config.json:
{ "mcpServers": { "newline": { "command": "npx", "args": ["-y","git+https://github.com/newline53/newline-mcp-server"], "env": { "NEWLINE_HMAC_KEY":"<<YOUR_KEY>>","NEWLINE_PROGRAM_ID":"<<YOUR_PROGRAM>>","NEWLINE_BASE_URL":"https://sandbox.newline53.com/api/v1" }}}}Cursor
Add the following to your (~/.cursor/mcp.json)
{
"mcpServers": {
"newline-local": {
"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"
}
}
}
}Windsurf
Add the following to your (~/.codeium/windsurf/mcp_config.json).
{
"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
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-serverDocker Usage
For the latest Dockerfile and environment configuration, refer to the GitHub repository.
docker build -t git+https://github.com/newline53/newline-mcp-server:latest .
```Run the container:
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" \
git+https://github.com/newline53/newline-mcp-server:latest
```When running the MCP server in Docker, do not hardcode credentials in the Dockerfile or command line. Instead, use an environment file for secrets:
docker run --env-file ./env.list git+https://github.com/newline53/newline-mcp-server:latestThis approach keeps sensitive values (like NEWLINE_HMAC_KEY and NEWLINE_PROGRAM_ID) out of shell history and image layers.
Example Prompts & Code Snippets
This section is divided into two parts: Example Prompts & Responses, which show how Claude interacts with MCP to automate workflows, and Developer Capabilities, which list the MCP tools developers can call via JSON-RPC to build integrations. Here are sample prompts you can use with AI assistants connected to the Newline MCP server:
-
"List all synthetic account types available"
-
"Show me all my synthetic accounts"
-
"Create a new checking account for customer John Doe"
-
"List all recent transfers"
-
"Create a wire transfer of $1000 from account A to account B"
-
"List all customers"
-
"Show me transaction details for txn_456"
Transaction Monitoring & Alerts
Prompt: Show me all transactions over $10K in the last 24 hours and alert me on Slack.
Claude Response:
- Filters transactions by date range, amount, and transaction type
- Adds posted/settled status from events and flags high‑value items
- Sends a Slack alert and provides a CSV export for finance
Program Health Trends
Prompt: Are volumes up or down for the last 30 days? Any anomalies worth investigating?
Claude Response:
- Summarizes counts and volumes for the last 30 days
- Segments by rail (ACH, Wire, Instant Payment) and highlights returns
- Shows a quick trend chart to link to your reporting summary
- Suggests next actions (e.g., review pending transactions, investigate a VRN cohort)
Real‑Time Transaction Status Lookup
Prompt: Claude, find the status of transfer 'abc789' and confirm settlement.
Claude Response:
- Retrieves the transfer and correlates with Transaction UID details
- Confirms posted/settled state; displays sender/receiver and key metadata (rail, timestamps, amount, fees)
- Generates a copy‑paste code snippet or opens the record for audit
Example MCP Requests (JSON-RPC)
Call a Tool
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "create-newline-transfer",
"arguments": {
"type": "wire",
"amount": 1000,
"from": "account_A",
"to": "account_B"
}
}
}Tool Catalog
After installation, you can start using MCP’s extensive toolset. This catalog provides a complete list of available tools grouped by resource type, along with their descriptions and intended use cases. The Newline MCP server exposes 35 tools grouped by resource type. The following catalog lists each tool along with its description and intended use case. Ensure tool names match the latest implementation:
Onboard & Configure
Authentication
| Resource | Tool | Description |
|---|---|---|
| Authentication | get-newline-auth-token | Retrieve current authentication |
Accounts & Customers
| Resource | Tool | Description |
|---|---|---|
| Synthetic Accounts | get-synthetic-account-types | List all available account types |
get-synthetic-accounts | List all synthetic accounts | |
get-synthetic-account | Get details of a specific account | |
create-synthetic-account | Create a new synthetic account | |
delete-synthetic-accounts | Delete a synthetic account | |
| Customers | list-customers | List all customers |
get-customer | Get details of a specific customer | |
| Customer Products | list-customer-products | List all customer products |
get-customer-product | Get details of a specific customer product |
Products & Pools
| Resource | Tool | Description |
|---|---|---|
| Products | list-products | List all products |
get-product | Get details of a specific product | |
| Pools | list-pools | List all pools |
get-pool | Get details of a specific pool |
Custodial Accounts
| Resource | Tool | Description |
|---|---|---|
| Custodial Accounts | list-custodial-accounts | List all custodial accounts |
get-custodial-account | Get details of a specific custodial account |
Identifiers (VRNs)
| Resource | Tool | Description |
|---|---|---|
| Identifiers (VRNs) | list-virtual-reference-numbers | List all virtual reference numbers |
get-virtual-reference-number | Get details of a specific virtual reference number |
Move Money
Transfers & Payments
| Resource | Tool | Description |
|---|---|---|
| Transfers | create-newline-transfer | Create a new transfer (ACH, Wire, Instant Payment) |
list-newline-transfers | List all transfers | |
get-newline-transfer | Get details of a specific transfer | |
| Combined Transfers | list-combined-transfers | List all combined transfers |
get-combined-transfer | Get details of a specific combined transfer |
Exceptions (Returns)
| Resource | Tool | Description |
|---|---|---|
| Returns | list-returns | List all returns |
get-return | Get details of a specific return |
Reconcile & Report
Transactions
| Resource | Tool | Description |
|---|---|---|
| Transactions | list-transactions | List all transactions |
get-transaction | Get details of a specific transaction |
Line Items (View Ledger)
| Resource | Tool | Description |
|---|---|---|
| Synthetic Line Items | list-synthetic-line-items | List all synthetic line items |
get-synthetic-line-item | Get details of a specific synthetic line item | |
| Custodial Line Items | list-custodial-line-items | List all custodial line items |
get-custodial-line-item | Get details of a specific custodial line item |
Monitor & Audit
Events
| Resource | Tool | Description |
|---|---|---|
| Transaction Events | list-transaction-events | List all transaction events |
get-transaction-event | Get details of a specific transaction event |
Customer Activities
| Resource | Tool | Description |
|---|---|---|
| Customer Activities | list-customer-activities | List all customer activities |
get-customer-activity | Get details of a specific customer activity |
Please note: This catalog is not all-inclusive. Additional tools may be introduced in future releases as the platform evolves.
Security & Troubleshooting
Security is critical when enabling AI-to-tool integrations. This section outlines best practices for protecting credentials, enforcing permissions, and troubleshooting common issues such as authentication errors or connectivity problems.
Security Best Practices
-
Never commit credentials to version control; use environment variables or secure vaults.
-
Rotate HMAC keys regularly and use separate credentials for development and production environments.
-
Enable human confirmation for tool invocations in all clients:
- VS Code: trust prompts
- Claude Desktop: extension approval
- Cursor: confirmation toggles
-
Restrict allowed tools to mitigate prompt injection risks when chaining servers.
-
Validate input parameters and enforce permission checks for sensitive operations.
Troubleshooting
Authentication Errors
-
Verify
NEWLINE_HMAC_KEY,NEWLINE_PROGRAM_ID, andNEWLINE_BASE_URL. -
Ensure keys are active and match your program configuration.
Connection Issues
-
Check network connectivity and proxy settings (
https_proxyorHTTPS_PROXY). -
Confirm the Newline API endpoint is accessible from your environment.
Tool Execution Failures
-
Confirm required parameters and verify permissions.
-
Review error messages for specific guidance.
Client Diagnostics
-
VS Code: Use “MCP: List Servers” and check the Output panel.
-
Cursor: Review tool toggles and ensure tool limits aren’t exceeded.
-
Claude Desktop: Confirm the MCP extension is installed and enabled.
Additional Recommendations
-
Rotate credentials periodically.
-
Refer to Newline Developer Docs for production endpoint details.
Updated 15 days ago
