Logo de Counsel

Counsel

Comunidade
mercurialsolo

MCP server for counsel

Publicado pormercurialsolo
Repositóriocounsel-mcp
IdiomaJavaScript
Forks
3
Estrelas
6
Ferramentas disponíveis
6
Tipo de transportestreamable-http
Categorias
LicençaMIT
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    Counsel disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 6 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    6 estrelas e 3 forks no repositório vinculado.

Counsel MCP Server

npm version License: MIT Node.js Version

An open-source Model Context Protocol (MCP) server that connects AI agents to the Counsel API for strategic reasoning and multi-perspective analysis.

Features

  • Hosted & Self-Hosted - Use the hosted server instantly or run your own instance
  • 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
  • Dual Transport - STDIO for local clients, HTTP for web clients and shared servers

Table of Contents


Quick Start (Hosted)

Connect instantly to the hosted Counsel MCP server - no installation required:

http://counsel-mcp.getmason.dev/mcp

For MCP clients that support HTTP transport, simply add:

json
{
  "mcpServers": {
    "counsel": {
      "url": "http://counsel-mcp.getmason.dev/mcp",
      "transport": "http"
    }
  }
}

OAuth authentication is handled automatically by your MCP client.


Installation (Self-Hosted)

Run your own instance of the Counsel MCP server locally.

Prerequisites

  1. Node.js 18+ installed on your system
  2. A Counsel account at counsel.getmason.dev

Claude Desktop

Add to your claude_desktop_config.json:

json
{
  "mcpServers": {
    "counsel": {
      "command": "npx",
      "args": ["-y", "counsel-mcp-server", "start"]
    }
  }
}
json
{
  "mcpServers": {
    "counsel": {
      "command": "npx",
      "args": ["-y", "counsel-mcp-server", "start"]
    }
  }
}

Claude Code (CLI)

bash
claude mcp add counsel -- npx -y counsel-mcp-server start

Or manually add to your MCP settings:

json
{
  "mcpServers": {
    "counsel": {
      "command": "npx",
      "args": ["-y", "counsel-mcp-server", "start"]
    }
  }
}

Cursor

Add to your Cursor MCP configuration (.cursor/mcp.json in your project or global settings):

json
{
  "mcpServers": {
    "counsel": {
      "command": "npx",
      "args": ["-y", "counsel-mcp-server", "start"]
    }
  }
}

Windsurf

Add to your Windsurf MCP configuration:

json
{
  "mcpServers": {
    "counsel": {
      "command": "npx",
      "args": ["-y", "counsel-mcp-server", "start"]
    }
  }
}

VS Code with Copilot

Add to your VS Code settings (settings.json):

json
{
  "mcp.servers": {
    "counsel": {
      "command": "npx",
      "args": ["-y", "counsel-mcp-server", "start"]
    }
  }
}

Other MCP Clients

The server supports two transport modes. Choose based on your client's capabilities:

STDIO Mode (Default)

Most MCP clients use STDIO transport. Configure with:

json
{
  "mcpServers": {
    "counsel": {
      "command": "npx",
      "args": ["-y", "counsel-mcp-server", "start"],
      "env": {
        "COUNSEL_API_KEY": "your_api_key_here"
      }
    }
  }
}

HTTP Mode with OAuth

For clients that support HTTP transport with OAuth 2.0, run the server separately:

bash
# Start the HTTP server
npx -y counsel-mcp-server http --port 3000

This starts an HTTP server with:

  • MCP endpoint: http://localhost:3000/mcp
  • OAuth discovery: http://localhost:3000/.well-known/oauth-authorization-server

Then configure your client to connect:

json
{
  "mcpServers": {
    "counsel": {
      "url": "http://localhost:3000/mcp",
      "transport": "http"
    }
  }
}

HTTP mode uses OAuth 2.0 with automatic token management - no API key required.

Transport Comparison

FeatureSTDIO ModeHTTP Mode
Commandnpx -y counsel-mcp-server startnpx -y counsel-mcp-server http
AuthAPI key via env varOAuth 2.0 (automatic)
SetupSingle configRun server + configure client
Best forClaude Desktop, Cursor, VS CodeWeb clients, shared servers

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:

bash
export COUNSEL_API_KEY=your_api_key_here

Or add it to your MCP client configuration:

json
{
  "mcpServers": {
    "counsel": {
      "command": "npx",
      "args": ["-y", "counsel-mcp-server", "start"],
      "env": {
        "COUNSEL_API_KEY": "your_api_key_here"
      }
    }
  }
}

HTTP Mode (OAuth 2.0)

When running in HTTP mode (npx -y counsel-mcp-server http), authentication is handled automatically through OAuth 2.0:

  1. When you first use a Counsel tool, your MCP client will prompt for authentication
  2. You'll be redirected to sign in with your Counsel account
  3. 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:

EndpointDescription
/.well-known/oauth-authorization-serverOAuth metadata discovery
/authorizeAuthorization endpoint
/tokenToken exchange endpoint
/registerDynamic client registration

Available Tools

start_consultation

Start a new strategic consultation (debate) to analyze a complex question with multiple perspectives.

ParameterTypeRequiredDescription
questionstringYesThe core question to analyze
contextstringNoAdditional context about the situation
modeenumNoDepth of analysis: quick, standard (default), deep
stakeholdersstring[]NoKey stakeholders to consider

Example:

Start a consultation about "Should we migrate our monolith to microservices?"
with context about our 50-person engineering team and mode set to deep

get_consultation_status

Check the status of an ongoing consultation.

ParameterTypeRequiredDescription
debate_idstringYesThe ID of the consultation

get_consultation_report

Retrieve the final synthesis report from a completed consultation.

ParameterTypeRequiredDescription
debate_idstringYesThe ID of the consultation

list_consultations

List your past consultations.

ParameterTypeRequiredDescription
limitnumberNoNumber of results (default: 10)

sharpen_question

Refine and improve a strategic question before starting a consultation.

ParameterTypeRequiredDescription
questionstringYesThe question to refine
contextstringNoAdditional context

Example:

Sharpen this question: "Is AI good for our company?"

consult_advisor

Start an interactive advisor session for brainstorming or scoping problems.

ParameterTypeRequiredDescription
questionstringYesThe initial topic or question

Usage Examples

Strategic Decision Making

Use Counsel to analyze: "Should we expand into the European market in 2025?"

Consider these stakeholders: CEO, CFO, Head of Sales, Legal
Use deep analysis mode

Question Refinement

Use the sharpen_question tool to improve this question:
"How do we fix our culture?"

Context: We're a 200-person startup experiencing rapid growth

Checking Consultation Progress

Check the status of consultation abc-123-def

Configuration

Environment Variables

VariableDefaultDescription
COUNSEL_API_URLhttps://counsel.getmason.devCounsel API base URL
PORT3000Server port (HTTP mode)

CLI Commands

bash
# STDIO mode (default) - for most MCP clients
npx -y counsel-mcp-server start

# HTTP mode - for clients supporting OAuth
npx -y counsel-mcp-server http [options]

HTTP Options:
  -p, --port <port>  Port to listen on (default: 3000)
  --host <host>      Host to bind to (default: localhost)

Troubleshooting

"Tool not found" Error

Ensure the MCP server is properly configured in your client. Restart your client after adding the configuration.

Authentication Issues

  1. Check that you have a valid Counsel account
  2. Try removing and re-adding the MCP server configuration
  3. 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

bash
# Check Node.js version (requires 18+)
node --version

# Try running directly to see errors
npx counsel-mcp-server start

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

bash
git clone https://github.com/mercurialsolo/counsel-mcp.git
cd counsel-mcp-server
npm install
npm run build

Commands

bash
npm run build            # Compile TypeScript
npm run dev              # Watch mode
npm run start            # Run server
npm test                 # Run tests
npm run lint             # Type check
npm run security:check   # Scan staged files for secrets
npm run security:check:all  # Scan all files for secrets

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

src/
├── index.ts        # HTTP server, OAuth proxy, MCP transport
├── client.ts       # API client with request-scoped auth
├── config.ts       # Environment configuration
└── tools/
    ├── debates.ts  # Consultation tools
    └── advisor.ts  # Advisor session tools

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

Quick Start

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Make your changes and add tests
  4. Run npm test to ensure tests pass
  5. Submit a pull request

License

MIT License - see LICENSE for details.


Links

Instalação

TypingMind
{
  "mcpServers": {
    "counsel": {
      "url": "http://counsel-mcp.getmason.dev/mcp",
      "env": {},
      "headers": {}
    }
  }
}

Ferramentas disponíveis

  • start_consultation
  • get_consultation_status
  • get_consultation_report
  • list_consultations
  • sharpen_question
  • consult_advisor

Use o MCP de Counsel com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar Counsel, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. Este MCP se conecta no TypingMind pela URL de um servidor MCP hospedado remotamente.

Adicione a URL de um servidor MCP

Use esta opção quando Counsel já estiver hospedado remotamente ou quando sua equipe quiser um conector compartilhado que vários usuários possam acessar.

1

Abra Conectores MCP

No TypingMind, vá até Plugins, abra Conectores MCP e selecione Adicionar URL.

  1. Abra o TypingMind no navegador.
  2. Acesse Plugins.
  3. Abra Conectores MCP.
  4. Clique em Adicionar URL.
Formulário do TypingMind para adicionar a URL de um servidor MCP personalizado
2

Cole a URL do servidor

Insira http://counsel-mcp.getmason.dev/mcp no campo URL do servidor. Adicione um nome para a conexão, uma descrição, um ícone, cabeçalhos HTTP personalizados ou configurações do cliente OAuth se o servidor exigir.

  1. Cole http://counsel-mcp.getmason.dev/mcp no campo URL do servidor.
  2. Digite um nome para a conexão de Counsel.
  3. Adicione uma descrição e um ícone para facilitar a identificação.
  4. Adicione cabeçalhos HTTP personalizados ou dados do cliente OAuth se o servidor exigir autenticação.
3

Crie a conexão

Clique em Criar conexão, volte à lista de Plugins e confirme que a nova conexão MCP está ativa.

  1. Clique em Criar conexão.
  2. Volte à lista de conectores MCP.
  3. Confirme que a conexão de Counsel aparece como ativa.
  4. Atualize a lista de plugins se a conexão não aparecer imediatamente.
4

Troque de modelo sem reconectar

Inicie um chat com seu modelo preferido, ative as ferramentas de Counsel em Plugins e mude para outro modelo sempre que necessário. A conexão MCP continua disponível no espaço de trabalho do TypingMind.

  1. Inicie um novo chat no TypingMind.
  2. Selecione o modelo de IA que deseja usar.
  3. Ative as ferramentas de Counsel em Plugins.
  4. Peça ao modelo para usar a ferramenta quando necessário.
  5. Mude para outro modelo de IA e reutilize a mesma conexão MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar Counsel para me ajudar nesta tarefa?
Counsel
Claro. Já li.
Veja o que encontrei usando Counsel.

Perguntas frequentes

Para que serve o servidor MCP Counsel?

Counsel é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP Counsel com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar Counsel com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP Counsel com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com Counsel conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP Counsel ao TypingMind?

É possível conectar Counsel ao TypingMind adicionando a URL do seu servidor MCP hospedado. Isso é útil para ter uma conexão MCP remota disponível no seu espaço de trabalho do TypingMind.

Quais ferramentas o MCP Counsel oferece no TypingMind?

Counsel disponibiliza 6 ferramentas MCP que podem ser ativadas na página Plugins do TypingMind e usadas no chat ou atribuídas a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP Counsel?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se Counsel exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇