QuiverMCP is a Model Context Protocol (MCP) server that provides access to QuiverAPI's Tier 1 endpoints for financial and political data. This server is designed for integration with LibreChat and other MCP clients, implementing the complete MCP protocol specification.
- TypeScript with ES2022 target and ESNext modules
- Node.js 18+ runtime
- Express.js for HTTP server transport
- MCP SDK (@modelcontextprotocol/sdk v1.15.0) for protocol implementation
- Axios for HTTP requests to QuiverAPI
- Zod for runtime type validation
- Docker for containerization
src/
├── index.ts # Main entry point for stdio mode
├── server-http.ts # HTTP server for LibreChat integration
├── quiver-client.ts # QuiverAPI client wrapper
├── tools.ts # MCP tools implementation (21 endpoints)
├── resources.ts # MCP resources implementation
├── prompts.ts # MCP prompts implementation
├── response-utils.ts # Response formatting utilities
├── types.ts # TypeScript type definitions
├── tier1-endpoints.json # QuiverAPI endpoint definitions
└── server-instructions.ts # Server instructions for prompts
tests/
├── comprehensive-test-suite.ts # Full endpoint testing
└── config-validation-suite.ts # Configuration validation
build/ # Compiled TypeScript output
test-results/ # Test execution results
endpoint-outputs/ # API response samples
# Development (watch mode)
npm run dev # HTTP server for LibreChat
npm run dev:stdio # Stdio server for Claude Desktop
# Building
npm run build # Compile TypeScript to build/
npm run watch # Watch mode compilation
# Production
npm start # HTTP server (requires build)
npm run start:stdio # Stdio server (requires build)
# Testing
npm run test # Basic endpoint testing
npm run test:comprehensive # Full test suite
npm run test:config # Configuration validation
npm run test:all # All tests combined# Development
docker-compose up -d # Start with local build
docker-compose logs -f # Follow logs
# Production
docker run -d \
--name quiver-mcp-server \
-p 3000:3000 \
-e QUIVER_API_TOKEN=your_token \
ghcr.io/usnavy13/quivermcp:latestQUIVER_API_TOKEN=your_quiver_api_token_here # Required: QuiverAPI authentication
QUIVER_BASE_URL=https://api.quiverquant.com # Optional: API base URL
PORT=3000 # Optional: Server port
LIBRECHAT_ORIGIN=* # Optional: CORS origin.env- Local environment variables (copy from.env.example)tsconfig.json- TypeScript compiler configurationdocker-compose.yml- Docker development setupDockerfile- Production container build
The server implements the complete MCP specification:
- Core Protocol:
initialize,initialized,ping - Tools: 21 QuiverAPI endpoints as callable tools
- Resources: Documentation and guides
- Prompts: Pre-built analysis templates
- Utilities: Health checks, capability negotiation
-
HTTP Mode (default): For LibreChat integration
- Endpoint:
http://localhost:3000/message - CORS-enabled for web clients
- Endpoint:
-
Stdio Mode: For Claude Desktop and CLI clients
- Uses stdin/stdout communication
- Direct MCP protocol over streams
- Client:
src/quiver-client.ts- Axios-based HTTP client - Endpoints: 21 Tier 1 endpoints from
tier1-endpoints.json - Authentication: Bearer token via
QUIVER_API_TOKEN - Rate Limiting: Handled by QuiverAPI service
get_companies- List of companies in QuiverAPIget_funds- SEC 13F fund information
get_recent_congress_trading- Recent transactions (all Congress)get_congress_holdings- Live holdings dataget_historical_congress_trading- Historical data by tickerget_recent_house_trading- House-specific recent tradesget_recent_senate_trading- Senate-specific recent tradesget_historical_house_trading- House historical by tickerget_historical_senate_trading- Senate historical by tickerget_bulk_congress_trading- Complete transaction history
get_recent_gov_contracts- Recent contracts (quarterly)get_recent_gov_contracts_all- All recent contractsget_historical_gov_contracts- Historical quarterly by tickerget_historical_gov_contracts_all- All historical by ticker
get_recent_lobbying- Recent lobbying spendingget_historical_lobbying- Historical lobbying by ticker
get_recent_bill_summaries- Recent bill summariesget_recent_legislation- Recent legislation data
get_live_off_exchange- Yesterday's off-exchange activityget_historical_off_exchange- Historical off-exchange by tickerget_ticker_data- Comprehensive ticker information
- Strict mode enabled with comprehensive type checking
- ES2022 target with ESNext modules
- Node resolution with synthetic default imports
- Build output to
./build/directory
// Standard pattern in tools.ts and quiver-client.ts
try {
const response = await client.makeRequest(endpoint, params);
return { content: [{ type: "text", text: response }] };
} catch (error) {
return {
content: [{ type: "text", text: `Error: ${error.message}` }],
isError: true
};
}- Text responses for data display
- JSON formatting for structured data
- Error handling with descriptive messages
- Pagination support where applicable
- Zod schemas for runtime validation
- Optional parameters with sensible defaults
- Type safety throughout the codebase
-
Basic Testing (
npm run test)- Health checks
- MCP protocol compliance
- Basic endpoint functionality
-
Comprehensive Testing (
npm run test:comprehensive)- All 21 endpoints
- Parameter variations
- Error scenarios
- Response format validation
-
Configuration Testing (
npm run test:config)- Environment variable validation
- API token verification
- Server connectivity
- Outputs saved to
test-results/with timestamps - JSON responses for analysis and debugging
- Test reports with pass/fail summaries
Add to librechat.yaml:
mcpServers:
quiver:
name: "QuiverAPI"
description: "Access to QuiverAPI financial and political data"
url: "http://localhost:3000"
transport: "http"
endpoints:
- "/message"- Ensure both LibreChat and QuiverMCP are on same network
- Use service names for container-to-container communication
- Configure CORS origins appropriately
- API tokens stored in environment variables only
- No token logging or exposure in responses
- Secure headers and CORS configuration
- Non-root user execution in Docker
- Alpine Linux base for minimal attack surface
- Environment isolation for secrets
- Parameter sanitization via Zod schemas
- SQL injection protection (not applicable - API client only)
- Rate limiting handled by upstream QuiverAPI
- Server health:
GET /health - MCP info:
GET /mcp - Protocol ping: MCP ping method
- Structured logging with timestamps
- Error tracking with stack traces
- Request/response logging for debugging
- Lightweight footprint (~50MB container
- Efficient memory usage with connection pooling
- Fast startup time (~2-3 seconds)
-
Server won't start
- Check
QUIVER_API_TOKENis set and valid - Verify port 3000 is available
- Review Docker logs for startup errors
- Check
-
API calls failing
- Validate QuiverAPI token permissions
- Check network connectivity to api.quiverquant.com
- Review rate limiting and quota usage
-
LibreChat integration
- Verify MCP server URL in LibreChat config
- Check Docker network connectivity
- Validate CORS settings for origin
# Server status
curl http://localhost:3000/health
# MCP capabilities
curl http://localhost:3000/mcp
# Manual tool testing
curl -X POST http://localhost:3000/message \
-H "Content-Type: application/json" \
-d '{"method": "tools/list"}'
# Container logs
docker logs quiver-mcp-server -fBased on git status, recent modifications include:
- Enhanced API methods with optional limit parameters
- Improved tool definitions with better parameter handling
- Response utilities for better data formatting
- Expanded prompt and resource systems
Files currently modified:
src/index.ts- Main server entry point updatessrc/quiver-client.ts- API client enhancementssrc/server-http.ts- HTTP server improvementssrc/tools.ts- Tool definition updates
New files added:
src/prompts.ts- MCP prompts implementationsrc/resources.ts- MCP resources systemsrc/response-utils.ts- Response formatting utilities
- Automated builds on push to main
- Multi-platform images (amd64, arm64)
- Container registry publishing to GHCR
- Version tagging on releases
- Latest stable:
ghcr.io/usnavy13/quivermcp:latest - Version tags:
ghcr.io/usnavy13/quivermcp:v1.0.0 - Branch builds:
ghcr.io/usnavy13/quivermcp:main