Skip to main content

A composable, ready-to-use MCP toolkit for agents and rapid integration.

Project description

McpStore

One-stop open-source high-quality MCP service management tool, making it easy for AI Agents to use various tools

GitHub stars GitHub forks GitHub issues GitHub license PyPI version Python versions PyPI downloads

English | 简体中文

🚀 Live Demo | 📖 Documentation | 🎯 Quick Start

Quick Start

Installation

Basic Installation

pip install mcpstore

Optional Features

# Monitoring features (file monitoring + system resource monitoring)
pip install mcpstore[monitor]

# Redis support
pip install mcpstore[redis]

# LangChain integration
pip install mcpstore[langchain]

# All features (monitor + redis + langchain)
pip install mcpstore[all]

# Other AI frameworks
pip install mcpstore[llamaindex]
pip install mcpstore[autogen]
pip install mcpstore[semantic-kernel]

Combined Installation

pip install mcpstore[monitor,redis,langchain]

Online Experience

Open-source Vue frontend interface, supporting intuitive MCP service management through SDK or API

image-20250721212359929

Quick start backend service:

from mcpstore import MCPStore
prod_store = MCPStore.setup_store()
prod_store.start_api_server(host='0.0.0.0', port=18200)

Intuitive Usage

store = MCPStore.setup_store()
store.for_store().add_service({"name":"mcpstore-wiki","url":"https://mcpstore.wiki/mcp"})
tools = store.for_store().list_tools()
# store.for_store().use_tool(tools[0].name, {"query":'hi!'})

Unified setup_store signature (new)

  • Only 4 parameters:
    • debug: False=OFF, True=DEBUG, or string level ("INFO"/"WARNING"/"ERROR"/"CRITICAL")
    • mcp_json: path to mcp.json
    • external_db: modular dict for external databases (currently cache.redis)
    • static_config: modular dict for monitoring/network/features/local_service; injection only, no auto-start

Example:

from mcpstore import MCPStore

# Minimal
store = MCPStore.setup_store(debug=False)

# With mcp.json and Redis cache backend
store = MCPStore.setup_store(
  mcp_json="./workspace/mcp.json",
  debug="INFO",
  external_db={
    "cache": {
      "type": "redis",
      "url": "redis://127.0.0.1:6379/0",
      "namespace": "prod",
      "dataspace": "auto",
      "socket_timeout": 2.0,
      "healthcheck_interval": 30,
    }
  },
  static_config={
    "features": {"preload_cache": False},
    "network": {"http_timeout_seconds": 30},
  },
)

# Retrieve the immutable setup snapshot later
cfg = store.for_store().setup_config()

LangChain Integration Example

Simple integration of mcpstore tools into LangChain Agent, here's a ready-to-run code:

from langchain.agents import create_tool_calling_agent, AgentExecutor
from langchain_core.prompts import ChatPromptTemplate
from langchain_openai import ChatOpenAI
from mcpstore import MCPStore
# ===
store = MCPStore.setup_store()
store.for_store().add_service({"name":"mcpstore-wiki","url":"https://mcpstore.wiki/mcp"})
tools = store.for_store().for_langchain().list_tools()
# ===
llm = ChatOpenAI(
    temperature=0, model="deepseek-chat",
    openai_api_key="****",
    openai_api_base="https://api.deepseek.com"
)
prompt = ChatPromptTemplate.from_messages([
    ("system", "You are an assistant, respond with emojis"),
    ("human", "{input}"),
    ("placeholder", "{agent_scratchpad}"),
])
agent = create_tool_calling_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)
# ===
query = "What's the weather like in Beijing?"
print(f"\n   🤔: {query}")
response = agent_executor.invoke({"input": query})
print(f"   🤖 : {response['output']}")

image-20250721212658085

Chain Call Design

MCPStore adopts chain call design, providing clear context isolation:

  • store.for_store() - Global store space
  • store.for_agent("agent_id") - Create isolated space for specified Agent

Multi-Agent Isolation

Assign dedicated toolsets for different functional Agents, actively supporting A2A protocol and quick agent card generation.

# Initialize Store
store = MCPStore.setup_store()

# Assign dedicated Wiki tools for "Knowledge Management Agent"
# This operation is performed in the private context of "knowledge" agent
agent_id1 = "my-knowledge-agent"
knowledge_agent_context = store.for_agent(agent_id1).add_service(
    {"name": "mcpstore-wiki", "url": "http://mcpstore.wiki/mcp"}
)

# Assign dedicated development tools for "Development Support Agent"
# This operation is performed in the private context of "development" agent
agent_id2 = "my-development-agent"
dev_agent_context = store.for_agent(agent_id2).add_service(
    {"name": "mcpstore-demo", "url": "http://mcpstore.wiki/mcp"}
)

# Each Agent's toolset is completely isolated without interference
knowledge_tools = store.for_agent(agent_id1).list_tools()
dev_tools = store.for_agent(agent_id2).list_tools()

Intuitively, you can use almost all functions through store.for_store() and store.for_agent("agent_id")

API Interface

Provides complete RESTful API, start web service with one command:

pip install mcpstore
mcpstore run api

Main API Endpoints

# Service Management
POST /for_store/add_service          # Add service
GET  /for_store/list_services        # Get service list
POST /for_store/delete_service       # Delete service

# Tool Operations
GET  /for_store/list_tools           # Get tool list
POST /for_store/use_tool             # Execute tool

# Monitoring & Statistics
GET  /for_store/get_stats            # System statistics
GET  /for_store/health               # Health check

Contributing

Welcome community contributions:

  • ⭐ Star the project
  • 🐛 Submit Issues to report problems
  • 🔧 Submit Pull Requests to contribute code
  • 💬 Share usage experiences and best practices

Star History

Star History Chart


McpStore is a project under frequent updates, we humbly ask for your stars and guidance

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

mcpstore-1.4.301.tar.gz (648.2 kB view details)

Uploaded Source

Built Distribution

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

mcpstore-1.4.301-py3-none-any.whl (740.0 kB view details)

Uploaded Python 3

File details

Details for the file mcpstore-1.4.301.tar.gz.

File metadata

  • Download URL: mcpstore-1.4.301.tar.gz
  • Upload date:
  • Size: 648.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for mcpstore-1.4.301.tar.gz
Algorithm Hash digest
SHA256 44c0f83354bacc1b05e46a8212462658301c77dcd07abd99cbbeb697dc001050
MD5 e480b8af93b638359f375cee60b65a0e
BLAKE2b-256 cafc5bd30520268d4513421861e533e0b868b0b94770940588d575b2885cd470

See more details on using hashes here.

File details

Details for the file mcpstore-1.4.301-py3-none-any.whl.

File metadata

  • Download URL: mcpstore-1.4.301-py3-none-any.whl
  • Upload date:
  • Size: 740.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for mcpstore-1.4.301-py3-none-any.whl
Algorithm Hash digest
SHA256 41517e8bed3baba1ae73b52e90cb8029b1740afab90f5e8497b2598f6913306a
MD5 a4c2f1370c07e4418b40cc1510190223
BLAKE2b-256 dcd2ee32090d4081ce0a5508d0444c4252b59c203a3edd0bb530ff4f8284cf66

See more details on using hashes here.

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