ankit-gautam23
MCP Serverankit-gautam23public

mcp context sdk

一个模块化、生产级的 Python SDK,用于支持 AI 模型和工具处理结构化上下文。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
MIT License
License

About This Server

一个模块化、生产级的 Python SDK,用于支持 AI 模型和工具处理结构化上下文。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

MCP Context SDK

MIT License PyPI Version Python Versions CI Status Documentation Code style: black Contributors Test Coverage

Overview

The MCP Context SDK is a modular, production-ready Python SDK that enables AI agents, models, and tools to work with structured context schemas. It provides a standardized way to handle context in AI applications, making it easier to build, validate, and share context-aware AI systems.

Features

  • 🎯 Dynamic Context Construction: Build and validate context dynamically using JSON schemas
  • 🔄 Schema-to-Prompt Conversion: Convert structured schemas into natural language prompts
  • 🛠️ Framework Integrations:
    • FastAPI for web applications
    • LangChain for AI workflows
    • AutoGen for multi-agent systems
    • CrewAI for team-based AI operations
    • LangGraph for complex AI workflows
    • OpenDevin for development automation
  • 📝 CLI Tools: Command-line interface for schema management and context conversion
  • 🎨 Streamlit UI: Interactive web interface for context editing and preview
  • Type Safety: Full type hints and schema validations
  • 📚 Documentation: Comprehensive guides and API references

Installation

From PyPI

pip install mcp-context-sdk

From Source

# Clone the repository
git clone https://github.com/ankit-gautam23/mcp-context-sdk.git
cd mcp-context-sdk

# Install with Poetry
poetry install

# Or install with pip
pip install -e .

Optional Dependencies

Install additional dependencies for specific integrations:

# FastAPI integration
pip install "mcp-context-sdk[fastapi]"

# All integrations
pip install "mcp-context-sdk[all]"

Quick Start

Basic Usage

from mcp_context_sdk import ContextBuilder, SchemaLoader

# Load a schema
schema = SchemaLoader().load_schema("coding", version="v1")

# Create context
context = ContextBuilder(schema).build({
    "language": "python",
    "task_type": "development",
    "complexity": "intermediate"
})

# Convert to prompt
prompt = context.to_prompt()

CLI Usage

List available schemas:

mcp list-schemas coding

Convert context to prompt:

mcp convert-context context.json coding --version v1

Streamlit UI

Run the interactive UI:

streamlit run examples/streamlit_ui.py

Documentation

Visit our documentation site for:

  • 📖 User Guide - Get started with MCP Context SDK
  • 📚 API Reference - Detailed API documentation
  • 🚀 Examples - Code examples and tutorials
  • 🤝 Contributing Guide - How to contribute to the project
  • 📋 Code of Conduct - Community guidelines
  • 🔒 Security Policy - Security reporting guidelines

Development

Setup Development Environment

  1. Clone the repository:

    git clone https://github.com/ankit-gautam23/mcp-context-sdk.git
    cd mcp-context-sdk
    
  2. Install development dependencies:

    poetry install
    
  3. Run tests:

    poetry run pytest
    
  4. Run linting:

    poetry run black .
    poetry run isort .
    poetry run flake8
    

Project Structure

mcp-context-sdk/
├── mcp_context_sdk/      # Main package
│   ├── core/            # Core functionality
│   ├── integrations/    # Framework integrations
│   └── utils/           # Utility functions
├── docs/                # Documentation
│   ├── landing/        # GitHub Pages site
│   └── api/            # API documentation
├── examples/            # Example code
├── schemas/             # JSON schemas
└── tests/              # Test suite

Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • How to submit issues
  • How to submit pull requests
  • Our development workflow
  • Code style guidelines

Security

Please report any security issues to SECURITY.md.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use MCP Context SDK in your research, please cite:

@software{mcp_context_sdk,
  author = {Ankit Gautam},
  title = {MCP Context SDK},
  year = {2025},
  url = {https://github.com/ankit-gautam23/mcp-context-sdk}
}

Contact

  • GitHub Issues: Create an issue
  • Email: ankit.gautamp23@gmail.com

Acknowledgments

  • Thanks to all contributors who have helped shape this project
  • Inspired by various AI frameworks and context management systems

Quick Start

1

Clone the repository

git clone https://github.com/ankit-gautam23/mcp-context-sdk
2

Install dependencies

cd mcp-context-sdk
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerankit-gautam23
Repomcp-context-sdk
LanguagePython
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation