NpcPy
The python library for research and development in NLP, multimodal LLMs, Agents, ML, Knowledge Graphs, and more.
What is NpcPy?
NpcPy is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to python library for research and development in nlp, multimodal llms, agents, ml, knowledge graphs, and more.
The python library for research and development in NLP, multimodal LLMs, Agents, ML, Knowledge Graphs, and more.
This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- The python library for research and development in NLP, mult
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx npcpyConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use NpcPy
NpcPy is a Python library and MCP-compatible framework for research and development in NLP, multimodal LLMs, agents, machine learning, and knowledge graphs. It provides a unified interface to 20+ LLM providers including Ollama, OpenAI, Anthropic, Gemini, and DeepSeek through LiteLLM integration, and supports multi-agent team orchestration, dynamic knowledge graph construction, media generation (images, audio, video), and a rich set of built-in agent tools including shell execution, Python evaluation, web search, and file editing. Researchers and ML engineers use NpcPy to prototype multi-agent pipelines, run local LLM experiments with Ollama, and build knowledge-graph-backed retrieval systems.
Prerequisites
- Python 3.10 or higher
- pip for package installation; uv or conda recommended for environment management
- At least one LLM provider: Ollama running locally, or an API key for OpenAI (OPENAI_API_KEY), Anthropic (ANTHROPIC_API_KEY), or Google Gemini (GEMINI_API_KEY)
- System dependencies for audio/media features on Linux: espeak, portaudio19-dev, ffmpeg (optional, only for yap/all extras)
Install NpcPy
Choose the install variant that matches your use case. The base package is minimal; 'lite' adds API provider libraries; 'local' adds Ollama and Hugging Face transformers support; 'all' installs everything.
pip install npcpy # minimal
pip install npcpy[lite] # + API provider libraries
pip install npcpy[local] # + ollama, diffusers, transformers
pip install npcpy[all] # complete installInstall system dependencies (Linux)
On Linux, install system libraries for audio and graphics support before installing npcpy with the yap or all extras.
sudo apt-get install espeak portaudio19-dev python3-pyaudio ffmpeg libcairo2-dev libgirepository1.0-devConfigure your API keys
Create a .env file in your project directory with your LLM provider credentials. NpcPy will load these automatically.
OPENAI_API_KEY=sk-your-openai-key
ANTHROPIC_API_KEY=sk-ant-your-anthropic-key
GEMINI_API_KEY=your-gemini-keyInitialize a new agent team structure
Use the npc-init CLI command to scaffold a new project with the standard team directory layout, including example NPC definitions and tool configurations.
npc-init my-agent-project
cd my-agent-projectLaunch the interactive shell
Start npcsh, the interactive terminal shell that gives you direct access to all NpcPy agents, tools, and LLM providers from the command line.
npcshRegister an MCP server with your team
To connect external MCP servers to your NpcPy team, add them to your team.ctx configuration file. NpcPy will load them alongside built-in tools.
# In team.ctx:
mcp_servers:
- path: ./tools/my_mcp_server.pyNpcPy Examples
Client configuration
Example MCP server registration in a team.ctx file for a NpcPy agent team that uses a custom database MCP server.
{
"mcpServers": {
"npcpy": {
"command": "npcsh",
"args": [],
"env": {
"OPENAI_API_KEY": "sk-your-openai-key",
"ANTHROPIC_API_KEY": "sk-ant-your-anthropic-key"
}
}
}
}Prompts to try
Example prompts and CLI commands that showcase NpcPy's multi-agent and research capabilities.
- "Use a CodingAgent to write and execute a Python script that parses the CSV files in ./data and outputs a summary."
- "Build a knowledge graph from the documents in ./papers/ and find connections between AI safety and alignment research."
- "Run a debate workflow: have three agents argue for different approaches to the RAG pipeline design."
- "Search the web for the latest benchmarks on open-source LLMs and store the results in a semantic index."
- "Generate an image of a neural network diagram using the diffusers backend."Troubleshooting NpcPy
ImportError for audio or media modules after install
Install the system dependencies first (espeak, portaudio19-dev, ffmpeg on Linux; 'brew install portaudio ffmpeg' on macOS), then reinstall with 'pip install npcpy[yap]' or 'pip install npcpy[all]'. Skipping system deps causes the Python audio bindings to fail at import time.
LLM provider returns 'API key not found' despite setting the key
NpcPy loads credentials from a .env file in the working directory. Make sure your .env file is in the directory where you run npcsh or your script. Also confirm the variable name exactly matches: OPENAI_API_KEY, ANTHROPIC_API_KEY, or GEMINI_API_KEY.
Ollama models are not discovered by NpcPy
Ensure the Ollama daemon is running with 'ollama serve' before starting npcsh. On macOS you can also start Ollama as a background app. NpcPy connects to Ollama at http://localhost:11434 by default.
Frequently Asked Questions about NpcPy
What is NpcPy?
NpcPy is a Model Context Protocol (MCP) server that python library for research and development in nlp, multimodal llms, agents, ml, knowledge graphs, and more. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install NpcPy?
Follow the installation instructions on the NpcPy GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with NpcPy?
NpcPy works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is NpcPy free to use?
Yes, NpcPy is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
NpcPy Alternatives — Similar Data Science & ML Servers
Looking for alternatives to NpcPy? Here are other popular data science & ml servers you can use with Claude, Cursor, and VS Code.
Ultrarag
★ 5.6kA Low-Code MCP Framework for Building Complex and Innovative RAG Pipelines
RocketRide
★ 3.1k📇 🏠 - MCP server that exposes RocketRide AI pipelines as t
Aix Db
★ 2.1kAix-DB 基于 LangChain/LangGraph 框架,结合 MCP Skills 多智能体协作架构,实现自然语言到数据洞察的端到端转换。
NeMo Data Designer
★ 1.9k🎨 NeMo Data Designer: Generate high-quality synthetic data from scratch or from seed data.
PaperBanana
★ 1.7kOpen source implementation and extension of Google Research’s PaperBanana for automated academic figures, diagrams, and research visuals, expanded to new domains like slide generation.
MiniMax
★ 1.5kBridges MiniMax AI capabilities to the Model Context Protocol, enabling AI agents to perform image understanding, text-to-image generation, and speech synthesis. It provides a standardized interface for accessing MiniMax's core tools via JSON-RPC.
Browse More Data Science & ML MCP Servers
Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up NpcPy in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use NpcPy?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.