Skip to main content
Glama

Claude Code MCP Async Server

Asynchronous MCP wrapper for Claude Code CLI

Enable Claude Code to spawn child Claude Code sessions for parallel task execution.

Features

  • Async execution - Start tasks in background, continue working

  • Multi-instance parallelism - Run multiple Claude Code sessions simultaneously

  • Automatic cleanup - No zombie processes

  • Zero config - Works out of the box

  • Cross-platform - Supports Windows, Linux, and macOS

  • CI/CD ready - GitHub Actions workflows included

Related MCP server: mcp-terminal-server

Quick Start

🚀 Install with UVX

Zero configuration - just run:

uvx claudecode-mcp-async-windows

Configure Claude Code

Add to your ~/.claude/settings.json:

{
  "mcpServers": {
    "claude-code-mcp": {
      "command": "uvx",
      "args": ["claudecode-mcp-async-windows"],
      "env": {}
    }
  }
}

Restart Claude Code

Reload or restart Claude Code to load the MCP server.

Usage Examples

🚀 Async Execution (Game Changer!)

Start a long task and continue working immediately:

You:

Please analyze the entire project code and generate a comprehensive technical report

Claude: I'll analyze your entire project and generate a technical report. This is a large task, so I'll start it asynchronously...

Task Started (Task ID: abc12345) You can continue working on other things while it runs in the background!

You: (Continue working immediately)

While the report is generating, help me write some unit tests

Claude: Sure! Let me write those unit tests for you...

You: (A few minutes later)

Can you check if the report task is finished?

Claude:Report Complete!

[View Detailed Technical Report]

  • Project structure analysis

  • Code quality assessment

  • Performance optimization recommendations

  • Security audit results

⚡ Parallel Execution

Run multiple tasks simultaneously:

You:

I need to do three things at once:

  1. Generate unit tests for utils.py

  2. Refactor database.py to use async/await

  3. Add type hints to all functions in api.py

Claude: I'll start all three tasks in parallel!

🔄 Task 1 Started (Task ID: task1) - Generating unit tests 🔄 Task 2 Started (Task ID: task2) - Refactoring database code 🔄 Task 3 Started (Task ID: task3) - Adding type hints

All tasks are running in parallel...

You: (Later)

Are all three tasks finished?

Claude:All Complete!

  • ✅ Task 1: Unit tests for utils.py generated

  • ✅ Task 2: database.py refactored to async mode

  • ✅ Task 3: Type hints added to api.py functions

🎯 Quick Sync Tasks

For simple immediate tasks:

You:

Write a Python function to validate email addresses

Claude:

import re

def validate_email(email):
    pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
    return re.match(pattern, email) is not None

# Usage examples
print(validate_email("user@example.com"))  # True
print(validate_email("invalid-email"))    # False

Task Complete!

Why Async?

Problem: Claude Code blocks the parent session while running.

Solution: This MCP server spawns child Claude Code processes that run in the background.

Benefits:

  • 🚀 Start a task and continue working immediately

  • ⚡ Run multiple tasks in parallel

  • 🎯 No blocking, no waiting

  • 🧹 Automatic process cleanup

Troubleshooting

Server not showing up?

  • Use absolute path in config

  • Linux/macOS: Run chmod +x claudecode_mcp_async_server.py

  • Restart Claude Code

Task stuck in "running"?

  • Wait a moment, large tasks take time

  • Check task files:

    • Linux/macOS: ls -la /tmp/claude_code_tasks/

    • Windows: dir %TEMP%\claude_code_tasks\

  • View logs:

    • Linux/macOS: tail -f /tmp/claude_code_mcp_debug.log

    • Windows: type %TEMP%\claude_code_mcp_debug.log

Platform-specific notes:

  • Windows: Automatic process cleanup (no zombie processes)

  • POSIX: Uses SIGCHLD handler for process cleanup

  • All platforms: Uses platform-appropriate temp directories

Requirements

  • Python 3.6+

  • Claude Code CLI installed

Development

Building from Source

Using uv (recommended):

# Install uv if you haven't already
pip install uv

# Build the package
uv build

# Install locally
uv pip install dist/*.whl --system

GitHub Actions

This project includes automated workflows:

  1. Test Workflow (.github/workflows/test.yml)

    • Runs on: Windows, Linux, macOS

    • Python versions: 3.8, 3.9, 3.10, 3.11, 3.12

    • Triggered on: push to main/develop/claude branches, pull requests

    • Actions:

      • Build with uv

      • Run import tests

      • Lint with flake8, black, isort

  2. Publish Workflow (.github/workflows/publish.yml)

    • Builds distribution packages using uv

    • Publishes to PyPI on release

    • Uploads to GitHub Releases

    • Supports TestPyPI for testing

Publishing to PyPI

Option 1: Automatic (GitHub Release)

  1. Create a new release on GitHub

  2. Workflow automatically builds and publishes to PyPI

Option 2: Manual (TestPyPI)

  1. Go to Actions → Publish to PyPI

  2. Run workflow manually

  3. Set test_pypi to true for TestPyPI

Setting up PyPI Publishing:

  1. Configure trusted publishing in your PyPI project settings

  2. Add environment pypi to your GitHub repository

  3. No API tokens needed (uses OIDC)

License

MIT License


Questions? Open an issue on GitHub.

Available Tools

3 tools
claude_code_check_resultA

Check the status of an async Claude Code task. Returns running/completed status and the result if available.

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYesThe task_id returned by claude_code_execute_async

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the full behavioral burden. It does disclose the returned states ('running/completed') and that a result is only available when done, but it omits details about error conditions, polling behavior, response structure, or whether the task result is cleared after being read.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that front-loads the action and then summarizes the output. Every clause contributes useful information with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter polling tool, the description is concise and covers the core behavior, but since there is no output schema it should explain more about the return format and possible status values. 'The result if available' is vague and an agent may not know how to interpret the returned payload.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers task_id fully with the description 'The task_id returned by claude_code_execute_async', so the baseline is 3. The tool description adds no additional parameter semantics beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Check') and a clear resource ('status of an async Claude Code task'), and explicitly states the return value ('running/completed status and the result if available'). It clearly distinguishes this tool from the execute siblings by focusing on status checking rather than execution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is for polling an async task by mentioning 'async' and 'status', and the schema parameter references claude_code_execute_async. However, it does not explicitly state when to prefer this tool over alternatives or provide any exclusion criteria, leaving the usage context largely implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

claude_code_executeB

Execute Claude Code synchronously with full control over parameters. Returns the result after completion. Common usage: prompt="your task", working_dir="/path/to/project"

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoModel to use (e.g., "sonnet", "opus", "haiku")
promptYesThe task prompt for Claude Code to execute
timeoutNoTimeout in seconds (default: no limit)
working_dirNoWorking directory for the task (default: current directory)
output_formatNoOutput format: "text" (default), "json", or "stream-json"text
additional_argsNoAdditional CLI arguments to pass to Claude Code
skip_permissionsNoSkip permission checks for automation (default: true)

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure, but it only states that execution is synchronous and returns a result. It does not mention side effects, the skip_permissions default, output shape variability, or error/timeout behavior, which are material for a code-execution tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short, front-loaded with the core synchronous behavior, and ends with a practical usage example. The phrase 'full control over parameters' is somewhat vague, but overall it is concise and direct.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is adequate for basic synchronous execution with a prompt, and the input schema covers all parameters. It is incomplete around return formats, the async alternative, and safety implications, which are important for this kind of tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all seven parameters. The description adds only a common-usage example with prompt and working_dir; this is mildly helpful but does not meaningfully extend the schema's parameter explanations.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool as executing Claude Code synchronously and returning the result after completion. This distinguishes it from the async sibling by emphasizing blocking behavior, though it does not explicitly name or contrast with claude_code_check_result.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The synchronous wording and 'returns the result after completion' imply it should be used when the caller wants to wait for Claude Code's output. However, there is no explicit guidance about when to prefer execute_async or check_result, leaving the selection largely implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

claude_code_execute_asyncA

Start a Claude Code task in the background and return immediately with a task_id. Use claude_code_check_result to retrieve the result later. This allows you to continue working while Claude Code runs.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoModel to use (e.g., "sonnet", "opus", "haiku")
promptYesThe task prompt for Claude Code to execute
working_dirNoWorking directory for the task (default: current directory)
output_formatNoOutput format: "text" (default), "json", or "stream-json"text
additional_argsNoAdditional CLI arguments to pass to Claude Code
skip_permissionsNoSkip permission checks for automation (default: true)

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. It clearly states the non-blocking nature, immediate return, task_id handoff, and deferred result retrieval. It does not mention safety implications like skipped permissions or failure handling, but the core async behavior is transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences with no filler. The key behavioral fact (background execution and immediate task_id return) is front-loaded, and the retrieval-next step is stated immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an async task-launch tool, the description provides the essential workflow: start, get task_id, check result later. It does not define the exact shape of the result, but there is no output schema and the absence is mitigated by pointing to the sibling check_result tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds little beyond the schema, and no parameter is given deeper meaning, but the schema already documents every parameter adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies a specific action: starting a Claude Code task in the background and returning immediately with a task_id. This distinguishes it from synchronous execution and from result retrieval via claude_code_check_result.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the async workflow well, telling the agent to use claude_code_check_result later and that it can continue working. It does not explicitly compare against claude_code_execute or state when not to use the tool, so it stops short of full exclusion guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv1.0.0
    • First observedclaude_code_check_result
    • First observedclaude_code_execute
    • First observedclaude_code_execute_async

TDQS

A4/5.0
Disambiguation5/5

The three tools have clearly distinct purposes: synchronous execution, asynchronous execution, and result polling. An agent can easily select the right tool based on whether it wants to wait or run in the background.

Naming Consistency5/5

All tools share the claude_code_ prefix and follow a snake_case imperative verb style: check_result, execute, execute_async. The family is predictable and consistent.

Tool Count5/5

With only three tools, each serves a distinct and necessary function for the server's purpose. The count is well-scoped and not padded with redundant operations.

Completeness5/5

The server covers the full execution lifecycle: start a task synchronously, start a task asynchronously, and check the result of an async task. There are no obvious dead ends or missing core operations for this focused domain.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/win10ogod/claudecode-mcp-async-windows'

If you have feedback or need assistance with the MCP directory API, please join our Discord server