NextAgency-MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
NextAgency-MCP
Note: This is an unofficial, community-maintained MCP server for NextAgency's API. It is not officially supported by NextAgency.
A lightweight, multi-tenant MCP server that exposes NextAgency's API as MCP tools with OAuth2 authentication and automatic token refresh.
Features
Setup & Security
Dead-Simple Setup - Get running in 2 commands
Secure OAuth2 - Authorization code flow with automatic refresh
OS Keychain Storage - Tokens encrypted in your system keychain
Capabilities
Multi-Tenant - Supports any
{tenant}.nextbroker.ioor{tenant}.nextbroker.infosubdomain45+ MCP Tools - Full CRUD for Cases, Contacts, Tasks, Notes, Employees, Benefits, Carriers, Sub-Agents, Addresses, and VOIP
Web UI - Built-in Setup Wizard and Tool Explorer
Integrations
Auto-Configure - One-click setup for Cursor, Claude Desktop, VS Code MCP, Claude Code CLI, and Continue.dev
Related MCP server: Relay
Quick Start
Installation (2 commands)
git clone https://github.com/your-org/NextAgency-MCP.git
cd NextAgency-MCP
npm run setupThat's it! The Web UI will open automatically at http://localhost:8787
Setup Wizard
The Web UI guides you through a simple 4-step process:
Enter Credentials
NextAgency tenant subdomain (e.g.,
yahoo)Base domain (
nextbroker.iofor production,nextbroker.infofor testing)OAuth Client ID and Client Secret
Authorize
Click "Next: Authorize" to authenticate with NextAgency
Grant permissions to the MCP server
Auto-Configure
Setup wizard auto-detects your installed MCP clients
Select your client from the dropdown
Click "Auto-Configure" for one-click setup
Done!
Restart your MCP client
Start using NextAgency tools in your AI assistant
Management Commands
# Start all services (Web UI + APIs)
npm run start:all
# Stop all services
npm run stop:all
# View logs
tail -f logs/*.log
# Rebuild after code changes
npm run buildAvailable Services
Once started, you have access to:
Web UI: http://localhost:8787
Tool Explorer: http://localhost:8787/explorer (test tools without an MCP client)
Setup Wizard API: http://localhost:8789 (backend for setup wizard)
Tool Explorer API: http://localhost:8788 (backend for tool explorer)
Manual Configuration
If auto-configuration doesn't work, or you're helping an LLM configure the server, use these manual instructions.
Configuration Format by Client
Cursor, Claude Desktop, and Continue.dev
Add this to your client's config file:
{
"mcpServers": {
"nextagency": {
"command": "nextagency-mcp",
"args": [],
"env": {
"NEXTA_CONFIG": "~/.nextagency-mcp/config.json"
}
}
}
}Claude Code CLI
Add this to ~/.claude.json:
{
"mcpServers": {
"nextagency": {
"command": "nextagency-mcp",
"args": [],
"env": {
"NEXTA_CONFIG": "~/.nextagency-mcp/config.json"
}
}
}
}Note: Claude Code CLI detection may not work on Linux. If the setup wizard doesn't detect it, manually add the config above to ~/.claude.json.
VS Code MCP (Native MCP Support)
VS Code uses a different format. Add this to your mcp.json file:
{
"servers": {
"nextagency": {
"type": "stdio",
"command": "nextagency-mcp",
"args": [],
"env": {
"NEXTA_CONFIG": "~/.nextagency-mcp/config.json"
}
}
}
}To open the config file in VS Code, run: "MCP: Open User Configuration"
Config File Locations by OS
šŖ Windows
Cursor:
%APPDATA%\Cursor\User\settings.jsonClaude Desktop:
%APPDATA%\Claude\claude_desktop_config.jsonClaude Code CLI:
%USERPROFILE%\.claude.jsonVS Code MCP:
%APPDATA%\Code\User\mcp.jsonContinue.dev:
%USERPROFILE%\.continue\config.json
š macOS
Cursor:
~/.cursor/config/cursor-settings.jsonClaude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.jsonClaude Code CLI:
~/.claude.jsonVS Code MCP:
~/Library/Application Support/Code/User/mcp.jsonContinue.dev:
~/.continue/config.json
š§ Linux
Cursor:
~/.config/Cursor/User/settings.jsonor~/.cursor/config/cursor-settings.jsonClaude Desktop:
~/.config/Claude/claude_desktop_config.jsonClaude Code CLI:
~/.claude.jsonVS Code MCP:
~/.config/Code/User/mcp.jsonor~/.config/Code - OSS/User/mcp.jsonContinue.dev:
~/.continue/config.json
Available Tools
Cases (Businesses)
list_cases- List all cases with paginationget_case- Get a specific case by IDsearch_cases- Search cases by querycreate_case- Create a new caseupdate_case- Update an existing case
Contacts
list_contacts- List all contactsget_contact- Get specific contactsearch_contacts- Search contacts by querysearch_contacts_by_phone- Search by phone numbercreate_contact- Create new contactupdate_contact- Update existing contact
Tasks
list_tasks- List tasks for a caseget_task- Get specific tasksearch_tasks- Search taskscreate_task- Create new taskupdate_task- Update existing task
Notes
list_notes- List notes for a caseget_note- Get specific notecreate_note- Create note with attachmentsupdate_note- Update existing note
Employees
list_employees- List employees for a caseget_employee- Get specific employeesearch_employees- Search employeescreate_employee- Create new employeeupdate_employee- Update existing employee
VOIP Recordings
list_voip_recordings- List all VOIP recordingsget_voip_recording- Get specific recordingsearch_voip_by_referenceable- Search by Business or Contactcreate_voip_recording- Create new recording
Benefits
list_benefits- List benefits for a caseget_benefit- Get specific benefitcreate_benefit- Create new benefitupdate_benefit- Update existing benefit
Carriers
list_carriers- List all carriersget_carrier- Get specific carriersearch_carriers- Search carrierscreate_carrier- Create new carrierupdate_carrier- Update existing carrier
Sub-Agents
list_sub_agents- List all sub-agentsget_sub_agent- Get specific sub-agentsearch_sub_agents- Search sub-agentscreate_sub_agent- Create new sub-agentupdate_sub_agent- Update existing sub-agent
Addresses
list_addresses- List all addressesget_address- Get specific addressupdate_address- Update existing address
System
check_auth_status- Check authentication status and token expiry
Authentication
NextAgency-MCP uses OAuth2 authorization code flow:
Authorization - User visits
/oauth/authorizeto grant accessToken Exchange - Authorization code is exchanged for access + refresh tokens
Secure Storage - Tokens are encrypted in OS keychain (via Keytar)
Auto-Refresh - Access tokens are automatically refreshed before expiry
401 Retry - Failed requests are retried once after refreshing token
Configuration Storage
Configuration is stored in ~/.nextagency-mcp/config.json:
{
"tenant": "yahoo",
"clientId": "your-client-id",
"clientSecret": "your-client-secret",
"redirectUri": "http://localhost:8787/callback",
"baseUrl": "nextbroker.io"
}Tokens are NEVER stored in this file - they're encrypted in your OS keychain.
Troubleshooting
Services won't start
Check if ports are already in use:
lsof -i :8787 # Web UI
lsof -i :8788 # Tool Explorer API
lsof -i :8789 # Setup Wizard APIStop all services and try again:
npm run stop:all
npm run start:all"No configuration found"
Run the setup wizard:
npm run start:all
# Visit http://localhost:8787"Not authenticated"
Your tokens may have expired. Re-run the setup wizard to re-authenticate:
npm run start:all
# Visit http://localhost:8787"Failed to refresh token"
Your refresh token has expired. Re-authenticate through the setup wizard.
MCP client can't find the server
Make sure nextagency-mcp is in your PATH after building:
npm run build
cd server
npm linkVerify it's accessible:
which nextagency-mcpCheck if services are running
# Check PIDs
cat .pids/*.pid
# Check logs
tail -f logs/*.log
# Test services directly
curl http://localhost:8787 # Web UI
curl http://localhost:8788/api/health # Tool Explorer
curl http://localhost:8789/api/health # Setup WizardFor LLMs Helping Users
When helping users set up NextAgency-MCP, use these commands:
First-time setup
npm run setupStart services
npm run start:allStop services
npm run stop:allCheck status
# Check if services are running
curl http://localhost:8787
curl http://localhost:8788/api/health
curl http://localhost:8789/api/health
# View logs
tail -f logs/*.logDirect users to the Web UI
Always direct users to http://localhost:8787 for setup. The wizard handles everything automatically.
Manual configuration
If auto-configure doesn't work, use the config file paths listed in "Config File Locations by OS" above. Remember:
VS Code MCP uses
serversformat withtype: "stdio"Claude Code CLI uses
mcpServersformat (may not auto-detect on Linux)All other clients use
mcpServersformat
Test the server
After configuration, test in the Tool Explorer:
http://localhost:8787/explorerDevelopment
# Install dependencies
npm install
# Run server in dev mode
npm run dev --workspace=server
# Run web UI in dev mode
npm run dev --workspace=web
# Build all workspaces
npm run build
# Run tests
npm testProject Structure
NextAgency-MCP/
āāā server/ # MCP server implementation
ā āāā src/
ā ā āāā auth/ # OAuth2 + token management
ā ā āāā api/ # NextAgency API client
ā ā āāā mcp/ # MCP tool definitions
ā ā āāā config/ # Configuration management
ā ā āāā index.ts # Entry point
ā āāā package.json
āāā web/ # Setup wizard & Tool Explorer
ā āāā src/
ā ā āāā components/ # React components
ā ā āāā server.ts # Setup wizard backend
ā ā āāā api-server.ts # Tool Explorer backend
ā ā āāā main.tsx
ā āāā package.json
āāā scripts/ # Setup and management scripts
ā āāā install.sh # Installation script
ā āāā setup.sh # Complete setup (install + start)
ā āāā start-all.sh # Start all services
ā āāā stop-all.sh # Stop all services
āāā package.json # Root workspace configSecurity
ā Tokens encrypted in OS keychain
ā No tokens in config files or logs
ā Automatic token refresh
ā HTTPS only for API calls
ā Strict endpoint allowlist
API Documentation
See the NextAgency API Documentation for detailed endpoint specifications.
Contributing
Contributions are welcome! Please open an issue or PR.
License
MIT
Support
For issues or questions, please open a GitHub issue.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect any AI agent to 1,000+ apps and 27,000+ actions through one remote MCP server (OAuth).
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage GoHighLevel CRM data including contacts, conversations, opportunities, calendars, and forms through MCP tools and resources.53AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to access a unified catalog of tools from various APIs (OpenAPI, GraphQL, MCP, Google Discovery) through the MCP protocol.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with GoHighLevel CRM through MCP tools, with support for OAuth 2.1 remote deployment and agency multi-sub-account mode.ISC
- AlicenseCqualityDmaintenanceProvides AI assistants with access to all public GoHighLevel API endpoints as MCP tools, enabling contact, conversation, opportunity, calendar, and other CRM operations with configurable safety gates for writes and deletes.552MIT