Skip to main content

MCP server for searching Claude Code conversation history via Agent Genesis

Project description

Agent Genesis MCP Server

MCP server for searching Claude Code conversation history

This package provides an MCP (Model Context Protocol) server that enables Claude Code to search through your conversation history using the Agent Genesis API.

Prerequisites

  • Python 3.10+
  • Agent Genesis API running (via Docker)

Installation

From PyPI

pip install agent-genesis-mcp

From Source

git clone https://github.com/agentgenesis/agent-genesis.git
cd agent-genesis/mcp-server
pip install -e .

Configuration

Add to your Claude Code configuration:

Linux/macOS: ~/.claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "agent-genesis": {
      "command": "agent-genesis-mcp",
      "args": []
    }
  }
}

Or if installed in a virtual environment:

{
  "mcpServers": {
    "agent-genesis": {
      "command": "/path/to/venv/bin/agent-genesis-mcp",
      "args": []
    }
  }
}

Available Tools

search_conversations

Search through your Claude Code conversation history.

Parameters:

  • query (str): Search query string
  • limit (int, optional): Max results (default: 5, max: 50)
  • project (str, optional): Filter by project name

Example:

search_conversations(query="authentication flow", limit=10, project="my-app")

Returns:

{
  "success": true,
  "results": [
    {
      "score": 0.856,
      "project": "my-app",
      "timestamp": "2025-01-15T10:30:00Z",
      "conversation_id": "conv_abc123",
      "content_snippet": "Implementing authentication...",
      "full_content_length": 1245
    }
  ],
  "total_found": 3,
  "query": "authentication flow"
}

get_api_stats

Get statistics about the indexed conversation corpus.

Returns:

  • Total conversations indexed
  • Number of unique projects
  • Index health status

check_api_health

Verify that the Agent Genesis API is running and healthy.

manage_scheduler

Control automatic conversation indexing.

Parameters:

  • action (str): One of status, enable, disable, remove, configure
  • frequency_minutes (int, optional): Indexing interval (default: 30)

Examples:

# Check status
manage_scheduler(action="status")

# Enable with 1-hour interval
manage_scheduler(action="enable", frequency_minutes=60)

# Disable
manage_scheduler(action="disable")

index_conversations

Manually trigger conversation indexing.

Parameters:

  • full_reindex (bool): Reindex all conversations (default: False)
  • time_range (str, optional): Time filter - "1h", "24h", "7d", "30d"
  • force (bool): Bypass rate limiting (default: False)

Examples:

# Index new conversations only
index_conversations()

# Full reindex
index_conversations(full_reindex=True, force=True)

# Index last 24 hours
index_conversations(time_range="24h")

API Configuration

By default, the MCP server connects to http://localhost:8080.

To use a different endpoint, set the environment variable:

export AGENT_GENESIS_API_URL=http://your-host:port

Resources

The server provides MCP resources for documentation:

  • config://api-endpoints - API endpoint documentation
  • agentgenesis://stats - Current corpus statistics
  • agentgenesis://health - API health status

Troubleshooting

"API Connection Failed"

Ensure the Agent Genesis Docker container is running:

docker-compose ps
curl http://localhost:8080/health

"Timeout" errors

The API might be busy indexing. Try again in a few seconds.

Tool not found in Claude

  1. Verify the MCP server is in your config file
  2. Restart Claude Code / Claude Desktop
  3. Check MCP logs (View → Developer → MCP Logs)

Development

# Clone the repo
git clone https://github.com/agentgenesis/agent-genesis.git
cd agent-genesis/mcp-server

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black .
ruff check .

License

MIT License - see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_genesis_mcp-1.2.0.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_genesis_mcp-1.2.0-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file agent_genesis_mcp-1.2.0.tar.gz.

File metadata

  • Download URL: agent_genesis_mcp-1.2.0.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agent_genesis_mcp-1.2.0.tar.gz
Algorithm Hash digest
SHA256 760fd850ac0b7c189b75685768200f99500302be96320f4db50fcf3c7f19847a
MD5 4b96b6cf15fb3ba956c556620f58e2e4
BLAKE2b-256 311c39529ed94ea94987f7704d8486a3c3fae4eb4b07a79e9c31cff78558ff19

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_genesis_mcp-1.2.0.tar.gz:

Publisher: pypi-publish.yml on Platano78/agent-genesis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_genesis_mcp-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_genesis_mcp-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fefb9cda6d576b4b0905bfcd592682e57d8728ed62647f59295a81e5c4c40a06
MD5 4aea9e45b2a0eee52f44e35134f41780
BLAKE2b-256 4a6a3ab569bdf62971779af7a2fd5db1d1f93e927aec51b8a805fa392994a15e

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_genesis_mcp-1.2.0-py3-none-any.whl:

Publisher: pypi-publish.yml on Platano78/agent-genesis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page