Counsel MCP Server
An open-source Model Context Protocol (MCP) server that connects AI agents to the Counsel API for strategic reasoning and multi-perspective analysis.
Features
Strategic Reasoning - Access Counsel's debate and multi-perspective reasoning engines
Advisor Sessions - Run interactive intake and profile tuning sessions
Native OAuth 2.0 - Standard MCP authentication handled automatically by clients
HTTP Transport - Works with any MCP client supporting HTTP/SSE transport
Table of Contents
Installation
Prerequisites
Node.js 18+ installed on your system
A Counsel account at counsel.getmason.dev
Claude Desktop
Add to your claude_desktop_config.json:
Claude Code (CLI)
Or manually add to your MCP settings:
Cursor
Add to your Cursor MCP configuration (.cursor/mcp.json in your project or global settings):
Windsurf
Add to your Windsurf MCP configuration:
VS Code with Copilot
Add to your VS Code settings (settings.json):
Other MCP Clients
For any MCP-compatible client, configure with:
Command:
npxArgs:
["-y", "counsel-mcp-server", "start"]Transport:
stdio(default) orhttpathttp://localhost:3000/mcp
HTTP Mode with OAuth (Advanced)
For clients that support HTTP transport with OAuth 2.0, run the server in HTTP mode:
This starts an HTTP server with:
MCP endpoint:
http://localhost:3000/mcpOAuth discovery:
http://localhost:3000/.well-known/oauth-authorization-server
Then configure your client with:
The HTTP mode proxies OAuth requests to Counsel's authorization server, enabling standard OAuth 2.0 authentication without manual API key configuration.
Authentication
The server supports two authentication modes:
STDIO Mode (Default)
Set the COUNSEL_API_KEY environment variable with your API key from counsel.getmason.dev:
Or add it to your MCP client configuration:
HTTP Mode (OAuth 2.0)
When running in HTTP mode (npx -y counsel-mcp-server http), authentication is handled automatically through OAuth 2.0:
When you first use a Counsel tool, your MCP client will prompt for authentication
You'll be redirected to sign in with your Counsel account
After authorization, tokens are managed automatically
No manual API key required in HTTP mode - your MCP client handles the entire OAuth flow.
OAuth Endpoints (HTTP Mode)
The server exposes standard OAuth 2.0 endpoints:
Endpoint | Description |
| OAuth metadata discovery |
| Authorization endpoint |
| Token exchange endpoint |
| Dynamic client registration |
Available Tools
start_consultation
Start a new strategic consultation (debate) to analyze a complex question with multiple perspectives.
Parameter | Type | Required | Description |
| string | Yes | The core question to analyze |
| string | No | Additional context about the situation |
| enum | No | Depth of analysis: |
| string[] | No | Key stakeholders to consider |
Example:
get_consultation_status
Check the status of an ongoing consultation.
Parameter | Type | Required | Description |
| string | Yes | The ID of the consultation |
get_consultation_report
Retrieve the final synthesis report from a completed consultation.
Parameter | Type | Required | Description |
| string | Yes | The ID of the consultation |
list_consultations
List your past consultations.
Parameter | Type | Required | Description |
| number | No | Number of results (default: 10) |
sharpen_question
Refine and improve a strategic question before starting a consultation.
Parameter | Type | Required | Description |
| string | Yes | The question to refine |
| string | No | Additional context |
Example:
consult_advisor
Start an interactive advisor session for brainstorming or scoping problems.
Parameter | Type | Required | Description |
| string | Yes | The initial topic or question |
Usage Examples
Strategic Decision Making
Question Refinement
Checking Consultation Progress
Configuration
Environment Variables
Variable | Default | Description |
|
| Counsel API base URL |
|
| Server port (HTTP mode) |
CLI Commands
Troubleshooting
"Tool not found" Error
Ensure the MCP server is properly configured in your client. Restart your client after adding the configuration.
Authentication Issues
Check that you have a valid Counsel account
Try removing and re-adding the MCP server configuration
Clear your client's MCP cache if available
Connection Refused
If running in HTTP mode, ensure:
The server is running (
npx counsel-mcp-server start)The port isn't blocked by a firewall
No other process is using the same port
Server Not Starting
Debug Mode
For verbose logging, check your MCP client's logs or run the server directly in a terminal to see output.
Development
Prerequisites
Node.js 18+
npm 9+
Setup
Commands
Security
This project includes automated secret detection:
Pre-commit hook: Automatically scans staged files before each commit
CI integration: Security checks run on all pull requests
Pattern detection: AWS keys, GitHub tokens, API keys, private keys, etc.
See CONTRIBUTING.md for details.
Project Structure
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Quick Start
Fork the repository
Create a feature branch:
git checkout -b feature/your-featureMake your changes and add tests
Run
npm testto ensure tests passSubmit a pull request
License
MIT License - see LICENSE for details.
Links
Counsel Platform - Strategic reasoning platform
MCP Specification - Model Context Protocol documentation
GitHub Issues - Report bugs or request features
GitHub Discussions - Ask questions