MCP Servers
Extend SafeAppeals with custom tools using the Model Context Protocol (MCP). Connect to external services, databases, APIs, and more.
What is MCP?
The Model Context Protocol is an open standard that allows AI assistants to connect to external tools and data sources. With MCP, you can give SafeAppeals access to web search, databases, file systems, APIs, and more.
Step 1: Open SafeAppeals Settings
First, navigate to the SafeAppeals settings panel:
- Click the gear icon in the bottom-left corner of SafeAppeals, or
- Press
Ctrl+Shift+Pand type "SafeAppeals: Open Settings" - Alternatively, click the settings gear in the top-right layout controls
Quick Tip: You can also right-click on the sidebar gear icon and select "SafeAppeals Settings" to go directly to the settings panel.
Step 2: Open the MCP Configuration File
SafeAppeals stores MCP server configurations in a JSON file. To edit it:
- In the Settings panel, scroll down to the MCP Servers section
- Click the "Open MCP Config" button
- This opens the
mcp.jsonfile in the editor
The config file is located at:
# Windows
%USERPROFILE%\.safeappeals\mcp.json
# macOS / Linux
~/.safeappeals/mcp.json
Step 3: Add Your MCP Server
The MCP config file uses a simple JSON structure. Each server needs a unique name and either a command (for local servers) or a url (for remote servers).
Basic Structure
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-name"],
"env": {
"API_KEY": "your-api-key-here"
}
}
}
}Configuration Options
commandstringrequiredThe command to run the MCP server (e.g., 'npx', 'node', 'python').
argsstring[]Command-line arguments passed to the command.
envobjectEnvironment variables to set when running the server (great for API keys).
urlstringFor remote MCP servers, the WebSocket or HTTP URL to connect to.
headersobjectHTTP headers to send when connecting to a remote server.
Popular MCP Servers
Here are some popular MCP servers you can add to SafeAppeals:
Google Drive
List, read, and search files in Google Drive. Google Docs export as Markdown, Sheets as CSV.
{
"mcpServers": {
"gdrive": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-gdrive"],
"env": {
"GDRIVE_CREDENTIALS_PATH": "C:\\Users\\YourName\\.gdrive-server-credentials.json"
}
}
}
}Gmail
Access Gmail with automatic authentication for reading and managing emails.
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": ["@gongrzhe/server-gmail-autoauth-mcp"]
}
}
}GitHub
Access GitHub repositories, issues, and pull requests.
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-server-github"],
"env": {
"GITHUB_TOKEN": "ghp_your_github_token"
}
}
}
}Supabase
Query and manage Supabase databases and edge functions.
{
"mcpServers": {
"supabase": {
"command": "npx",
"args": ["-y", "@supabase/mcp-server-supabase"],
"env": {
"SUPABASE_ACCESS_TOKEN": "your-access-token"
}
}
}
}PostgreSQL
Query PostgreSQL databases directly from AI chat.
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-server-postgres"],
"env": {
"DATABASE_URL": "postgresql://user:pass@localhost:5432/dbname"
}
}
}
}Step 4: Save and Reload
After adding your MCP server configuration:
- Save the file — Press
Ctrl+S - Wait for detection — SafeAppeals automatically detects changes to mcp.json
- Check the status — Return to Settings → MCP Servers to see your server status
Server is connecting...
Server is ready to use
Check configuration
Step 5: Use MCP Tools in Chat
Once connected, your MCP tools are automatically available to the AI:
- Open the AI chat sidebar (
Ctrl+L) - Switch to Case Manager or Drafting mode for full tool access
- Ask the AI to use your tools naturally
Example Prompts
- • "Search my Google Drive for documents related to the Smith case"
- • "Check my Gmail for any emails from the insurance company this week"
- • "List all issues in my GitHub repository"
- • "Query my Supabase database for all cases filed this month"
Toggling Servers On/Off
You can enable or disable individual MCP servers without removing them from the config:
- Go to SafeAppeals Settings
- Find the MCP Servers section
- Click the toggle next to any server to enable/disable it
Disabled servers won't connect or consume resources, but their configuration is preserved.
Troubleshooting
Server shows 'Error' status
- • Check that the command exists and is in your PATH
- • Verify all required environment variables are set
- • Try running the command manually in a terminal to see error messages
- • Check if the MCP server package is installed correctly
Server stuck on 'Loading'
- • The server may be taking time to initialize
- • Check your internet connection for remote servers
- • Look for firewall or antivirus blocking the connection
- • Try restarting SafeAppeals
Tools not appearing in chat
- • Make sure you're in Case Manager or Drafting mode
- • Verify the server shows 'Connected' status in Settings
- • Try starting a new chat thread
- • Check that the server actually exposes tools (some only provide resources)
JSON parse error
- • Ensure your mcp.json is valid JSON (use a JSON validator)
- • Check for missing commas, quotes, or brackets
- • Escape backslashes in Windows paths (use \\ instead of \)
- • Remove any trailing commas
Complete Example Configuration
Here's a full example with multiple MCP servers configured:
{
"mcpServers": {
"gdrive": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-gdrive"],
"env": {
"GDRIVE_CREDENTIALS_PATH": "C:\\Users\\YourName\\.gdrive-server-credentials.json"
}
},
"gmail": {
"command": "npx",
"args": ["@gongrzhe/server-gmail-autoauth-mcp"]
},
"github": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-server-github"],
"env": {
"GITHUB_TOKEN": "ghp_..."
}
}
}
}Security Best Practices
Keep Your API Keys Safe
- • Never share your mcp.json file with others
- • Don't commit API keys to version control
- • Use environment variables when possible
- • Regularly rotate API keys for sensitive services
- • Only grant MCP servers the minimum permissions needed
Learn More
Explore the MCP ecosystem: