unicorn-query-mcp
v1.0.2
Published
MCP server for querying and managing unicorn company data from Google Sheets
Maintainers
Readme
Unicorn Query MCP
A Model Context Protocol (MCP) server for querying and managing unicorn company data stored in Google Sheets.
Features
- Query Companies: Search and filter unicorn companies with intelligent matching
- Add Companies: Insert new company records
- Update Companies: Modify existing company information
- Delete Companies: Remove company records
- Smart Search: Advanced search with fuzzy matching, similarity scoring, and multi-field search
- Flexible Filtering: Support for partial matches, case-insensitive search, and similarity-based matching
Installation
Option 1: Global Installation
npm install -g unicorn-query-mcpOption 2: Use with npx (Recommended for Claude Desktop)
No installation required - use directly with npx.
Claude Desktop Configuration
Add the following to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, or the appropriate path for your OS):
{
"mcpServers": {
"unicorn-query": {
"command": "npx",
"args": ["-y", "unicorn-query-mcp"],
"env": {
"UNICORN_MCP_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\nYOUR_PRIVATE_KEY_HERE\n-----END PRIVATE KEY-----\n"
}
}
}
}Note: Replace YOUR_PRIVATE_KEY_HERE with the actual private key content from your Google service account JSON file. The private key should include the \n characters as shown.
Configuration Requirements
Before using the MCP server, you need to set up Google Sheets API access:
1. Create Google Service Account
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Google Sheets API
- Create a Service Account with "Editor" role
- Generate and download JSON key file
2. Share Google Sheet Access
Share the following Google Sheet with your service account email:
- Spreadsheet URL: https://docs.google.com/spreadsheets/d/1CNLxthFClt47s9gegbyftKCXEA04s8QafxUlRiZQwZk
- Service Account Email: The email from your JSON key file
3. Configure Credentials
Set the private key as an environment variable:
export UNICORN_MCP_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nYOUR_PRIVATE_KEY_HERE\n-----END PRIVATE KEY-----\n"Alternative methods (if you prefer to manage the full JSON file):
Method A: Environment Variable
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account-key.json"Method B: Local File
Place your JSON key file as google-credentials.json in the working directory.
Configuration
Set up Google Sheets API:
- Create a Google Cloud Project
- Enable Google Sheets API
- Create a service account and download the JSON key file
- Share your Google Sheet with the service account email
- Place the JSON key file in the project root as
mystic-braid-476614-t8-4736c84f742d.json
Configure the spreadsheet ID in
src/services/GoogleSheetsService.ts
Usage
As an MCP Server
The server communicates via stdio and can be integrated with MCP-compatible clients.
Available Tools
query_companies
Query companies with optional filters and fuzzy search.
Parameters:
filter(object): Filter criteria (e.g.,{"Category": "AI"})search(string): Fuzzy search termlimit(number): Maximum results to return (default: 50)
Example:
{
"filter": {"Category": "AI"},
"search": "machine learning",
"limit": 10
}add_company
Add a new company to the database.
Parameters:
company(object): Company data with all required fields
Example:
{
"company": {
"Company Name": "Example Corp",
"Founded": "2020",
"Valuation (USD)": "100000000",
"Category": "AI",
"Headquarters": "San Francisco, USA"
}
}update_company
Update an existing company.
Parameters:
companyName(string): Name of the company to updateupdates(object): Fields to update
delete_company
Delete a company from the database.
Parameters:
companyName(string): Name of the company to delete
Development
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
# Run tests
npm testData Structure
The Google Sheet should have the following columns:
- Company Name
- Founded
- Valuation (USD)
- Total Funding (USD)
- Latest Round
- Latest Round Date
- Category
- Headquarters
- Key Metrics
- Status
- Notes
License
MIT
