December v0.4.19

Model Context Protocol (MCP)

Connect MCP servers to December to give it more tools, such as databases and GitHub.

This page helps you connect MCP servers to December, so December can use more tools.

Overview

An MCP server is a program that gives tools to an agent. It uses the open Model Context Protocol (MCP). For example, a Postgres MCP server gives December a tool to query your database.

December connects to the MCP servers in your configuration when the CLI starts.

Add a server with the CLI

Use december mcp add with a server name and a command or URL:

# Local server (stdio), with an environment variable
december mcp add github npx -y @modelcontextprotocol/server-github -e GITHUB_PERSONAL_ACCESS_TOKEN=ghp_...

# Remote server (URL), with a header
december mcp add remote https://example.com/sse -H "Authorization: Bearer <token>"

# Save the server for this project only
december mcp add postgres npx -y @modelcontextprotocol/server-postgres postgresql://localhost/mydb --scope project

If you do not give --scope project, December saves the server in your global settings.

Use these commands to manage servers:

  • december mcp list shows each server, its scope, and its status.
  • december mcp get <name> shows the configuration of one server.
  • december mcp remove <name> removes a server.

Configure servers in a file

December reads MCP servers from two files:

  1. Global: the mcpServers key in ~/.december/config.json. These servers work in every project.
  2. Project: .december/mcp.json in your project root. These servers work in this project only.

If both files have a server with the same name, the project server replaces the global server.

Both files use the standard mcpServers format:

{
    "mcpServers": {
        "postgres": {
            "command": "npx",
            "args": [
                "-y",
                "@modelcontextprotocol/server-postgres",
                "postgresql://user:pass@localhost:5432/mydb"
            ]
        },
        "github": {
            "command": "npx",
            "args": ["-y", "@modelcontextprotocol/server-github"],
            "env": {
                "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_..."
            }
        },
        "remote": {
            "url": "https://example.com/sse",
            "headers": {
                "Authorization": "Bearer <token>"
            }
        }
    }
}

Server fields

  • command, args, env, cwd: December starts a local process and talks to it over stdio.
  • url, headers: December connects to a remote server over SSE.
  • disabled: Set to true to keep the server in the file but not connect to it.
  • eager: Set to true to load all the tools of the server when the session starts. See Tool loading.

Manage servers in a session (/mcp)

Type /mcp to open the MCP view. The view shows each server, its scope, its status, and its tools.

  • Press Space to start or stop the selected server.
  • Press Enter to see the details and tools of a server.
  • Press a to add a server. You can select a preset, such as github, postgres, or filesystem, or press c to type a custom command.
  • Press d to remove a server.
  • Press r in the details view to restart a server.

The status bar shows the number of MCP servers, for example · 2 MCP.

Tool names

December adds a prefix to each MCP tool name. This prevents conflicts with the built-in tools of December. The format is:

mcp_<server_name>_<tool_name>

For example, the query tool of the postgres server becomes mcp_postgres_query.

Tool loading

Many tools in the instructions make each request larger. December limits this:

  • If a server has 5 tools or fewer, December loads all of them when the session starts.
  • If a server has more than 5 tools, December does not load them at the start. December finds them with the search_tools tool when a task needs them.
  • If you set "eager": true, December loads all the tools of the server at the start.
  • If you set "eager": false, December never loads the tools at the start.