MCP Server
A Model Context Protocol server that gives AI assistants full access to the Campaign CRM. Built on the official MCP SDK, it wraps the REST API so that tools like Claude Desktop and Claude Code can manage contacts and track engagement through natural language.
Requires authentication. The MCP server connects to the API using a Sanctum bearer token. You'll need a running instance of the application and a valid API token.
Setup
1. Install dependencies
cd mcp-server && npm install
2. Generate an API token
php artisan app:generate-api-token
3. Configure your client
Add the server to your MCP client configuration. The server reads CONTACTS_API_TOKEN and CONTACTS_API_URL from the project's .env file automatically.
Claude Code (.mcp.json)
{
"mcpServers": {
"contacts": {
"command": "node",
"args": ["mcp-server/index.js"]
}
}
}
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"indigo-nebula-contacts": {
"command": "node",
"args": ["/absolute/path/to/mcp-server/index.js"],
"env": {
"CONTACTS_API_TOKEN": "your-token-here",
"CONTACTS_API_URL": "http://localhost:8000"
}
}
}
}
Tools
38 tools across 8 resource groups
Contacts
9 toolslist_contacts
List all contacts with pagination
search_contacts
Search by name, email, or notes
get_contact
Get full details including related data
add_contact
Create a new contact
update_contact
Update an existing contact
delete_contact
Soft-delete a contact
restore_contact
Restore a soft-deleted contact
export_contacts
Export all contacts as CSV
import_contacts
Import contacts from CSV content
Roles
3 toolsvolunteer, donor, door_knocker, phone_banker, event_host, sign_location, endorser, advisor, committee_member, precinct_captain
list_contact_roles
List roles for a contact
add_contact_role
Add a role to a contact
remove_contact_role
Remove a role from a contact
Skills
3 toolssocial_media, graphic_design, web_development, writing, public_speaking, fundraising, event_planning, data_entry, canvassing, legal, accounting, photography, videography, translation
list_contact_skills
List skills for a contact
add_contact_skill
Add a skill to a contact
remove_contact_skill
Remove a skill from a contact
Interactions
5 toolsdoor_knock, phone_call, text_message, email, event, meeting, social_media, mail, other
list_interactions
List interactions for a contact
add_interaction
Log a new interaction
get_interaction
Get interaction details
update_interaction
Update an interaction
delete_interaction
Delete an interaction
Donations
5 toolscash, check, credit_card, online, in_kind, other
list_donations
List donations for a contact
add_donation
Record a new donation
get_donation
Get donation details
update_donation
Update a donation
delete_donation
Delete a donation
Yard Signs
5 toolsrequested, placed, removed, damaged, stolen, returned
list_yard_signs
List yard signs for a contact
add_yard_sign
Request or place a yard sign
get_yard_sign
Get yard sign details
update_yard_sign
Update yard sign status
delete_yard_sign
Delete a yard sign
Donor Ask Statuses
5 toolsnot_asked, planned, asked, pledged, donated, declined
list_donor_ask_statuses
List ask statuses for a contact
add_donor_ask_status
Create a donor ask record
get_donor_ask_status
Get ask status details
update_donor_ask_status
Update ask status
delete_donor_ask_status
Delete an ask status
Activity Logs
3 toolslist_activity_logs
List activity logs for a contact
add_activity_log
Add an activity log entry
get_activity_log
Get activity log details
Architecture
@modelcontextprotocol/sdkmcp-server/index.js — single-file implementation