graphiti/mcp_server/PYPI_SETUP_COMPLETE.md
Lars Varming eddeda67b3 Fix graphiti-mcp-varming package for PyPI publication
MCP Server Package Fixes:
- Add build-system configuration to pyproject.toml
- Fix module imports to use relative imports for proper packaging
- Fix TypedDict import for Python 3.10 compatibility
- Remove unsupported MCP SDK parameters (tags, meta)
- Add GitHub Actions workflow for automatic PyPI publishing
- Add PyPI publishing documentation and checklist

Code Quality Improvements:
- Fix code formatting in graphiti_core (line length, whitespace)

This prepares v1.0.0 for publication to PyPI, enabling users to install
with: uvx graphiti-mcp-varming

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 19:32:13 +01:00

3.9 KiB

PyPI Package Setup Complete! 🚀

Summary

Your Graphiti MCP Server is now ready to be published to PyPI as graphiti-mcp-varming!

What Was Done

1. Package Configuration (mcp_server/pyproject.toml)

  • Name: graphiti-mcp-varming (clearly distinguishes your enhanced fork)
  • Entry point: graphiti-mcp-varming command added
  • Dependencies: Standalone package with:
    • graphiti-core>=0.16.0 (includes Neo4j support by default)
    • All MCP and OpenAI dependencies
    • Optional extras for FalkorDB, other LLM providers (Anthropic, Groq, Gemini, Voyage)
  • Metadata: Proper description, keywords, classifiers for PyPI

2. GitHub Actions Workflow (.github/workflows/publish-mcp-pypi.yml)

  • Automatic publishing to PyPI when you push tags like mcp-v1.0.0
  • Builds package with uv build
  • Publishes with uv publish
  • Creates GitHub releases with dist files

3. Documentation Updates

  • DOCS/LibreChat-Unraid-Stdio-Setup.md: Updated with uvx commands
  • mcp_server/PYPI_PUBLISHING.md: Complete publishing guide
  • mcp_server/README.md: Added PyPI package notice

Next Steps (What You Need To Do)

1. Add PyPI Token to GitHub

  1. Go to: https://github.com/Varming73/graphiti/settings/secrets/actions
  2. Click "New repository secret"
  3. Name: PYPI_API_TOKEN
  4. Value: Your PyPI token (starts with pypi-)
  5. Click "Add secret"

2. Update Your Email in pyproject.toml (Optional)

Edit mcp_server/pyproject.toml line with your real email:

authors = [
    {name = "Varming", email = "your-real-email@example.com"}
]

3. Publish First Version

# Make sure all changes are committed
git add .
git commit -m "Prepare graphiti-mcp-varming for PyPI publishing"
git push

# Create and push the first release tag
git tag mcp-v1.0.0
git push origin mcp-v1.0.0

4. Monitor Publishing

5. Verify Publication

After workflow completes:

Usage After Publishing

Users can now install your enhanced MCP server easily:

Basic Installation (Neo4j support included)

uvx graphiti-mcp-varming

With FalkorDB Support

uvx --with graphiti-mcp-varming[falkordb] graphiti-mcp-varming

With All LLM Providers

uvx --with graphiti-mcp-varming[providers] graphiti-mcp-varming

With Everything

uvx --with graphiti-mcp-varming[all] graphiti-mcp-varming

In LibreChat (stdio mode)

mcpServers:
  graphiti:
    type: stdio
    command: uvx
    args:
      - graphiti-mcp-varming
    env:
      GRAPHITI_GROUP_ID: "{{LIBRECHAT_USER_ID}}"
      NEO4J_URI: "bolt://neo4j:7687"
      NEO4J_USER: "neo4j"
      NEO4J_PASSWORD: "your_password"
      OPENAI_API_KEY: "${OPENAI_API_KEY}"

Future Releases

To publish updates:

  1. Update version in mcp_server/pyproject.toml
  2. Commit and push changes
  3. Create and push new tag: git tag mcp-v1.0.1 && git push origin mcp-v1.0.1
  4. GitHub Actions handles the rest!

Package Features

Your graphiti-mcp-varming package includes:

Standalone: All dependencies bundled (graphiti-core, neo4j driver, etc.) Multi-database: Neo4j (default) + optional FalkorDB support Multi-LLM: OpenAI (default) + optional Anthropic, Groq, Gemini, Azure Enhanced Tools: Your custom get_entities_by_type and compare_facts_over_time Per-user Isolation: Full support for LibreChat multi-user via stdio mode Easy Install: One command with uvx

Troubleshooting

See mcp_server/PYPI_PUBLISHING.md for detailed troubleshooting guide.


Questions? The publishing guide has all the details: mcp_server/PYPI_PUBLISHING.md