[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "mcp-langchain-agent"
version = "1.0.0"
description = "A LangChain agent with OpenAI-compatible API that integrates with MCP Gateway"
readme = "README.md"
license = {text = "Apache-2.0"}
authors = [
{name = "MCP Context Forge Contributors", email = "noreply@example.com"}
]
keywords = ["mcp", "langchain", "ai", "agent", "openai", "a2a"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
requires-python = ">=3.10"
dependencies = [
"fastapi>=0.116.1",
"httpx>=0.28.1",
"langchain>=0.3.27",
"langchain-core>=0.3.75",
"langchain-openai>=0.3.32",
"openai>=1.106.1",
"orjson>=3.11.5",
"pydantic>=2.11.7",
"python-dotenv>=1.1.1",
"python-multipart>=0.0.20",
"typing-extensions>=4.15.0",
"uvicorn[standard]>=0.35.0",
]
[project.optional-dependencies]
dev = [
"bandit>=1.8.6",
"black>=25.1.0",
"httpx>=0.28.1",
"isort>=6.0.1",
"mkdocs>=1.6.1",
"mkdocs-material>=9.6.18",
"mypy>=1.17.1",
"pre-commit>=4.3.0",
"pytest>=8.4.2",
"pytest-asyncio>=1.1.0",
"pytest-cov>=6.2.1",
"pytest-mock>=3.15.0",
"ruff>=0.12.12",
"watchdog>=6.0.0",
]
test = [
"httpx>=0.28.1",
"pytest>=8.4.2",
"pytest-asyncio>=1.1.0",
"pytest-cov>=6.2.1",
"pytest-mock>=3.15.0",
]
lint = [
"bandit>=1.8.6",
"mypy>=1.17.1",
"ruff>=0.12.12",
]
# LLM Provider Support
azure = [
"langchain-openai>=0.3.32",
]
bedrock = [
"boto3>=1.40.25",
"langchain-aws>=0.2.31",
]
ollama = [
"langchain-community>=0.3.29",
]
anthropic = [
"langchain-anthropic>=0.3.19",
]
all-providers = [
"boto3>=1.40.25",
"langchain-anthropic>=0.3.19",
"langchain-aws>=0.2.31",
"langchain-community>=0.3.29",
"langchain-openai>=0.3.32",
]
[project.urls]
Homepage = "https://github.com/IBM/mcp-context-forge"
Documentation = "https://ibm.github.io/mcp-context-forge/"
Repository = "https://github.com/IBM/mcp-context-forge"
Issues = "https://github.com/IBM/mcp-context-forge/issues"
[project.scripts]
mcp-langchain-agent = "agent_runtimes.langchain_agent.start_agent:main"
[tool.setuptools.packages.find]
where = ["."]
include = ["agent_runtimes.langchain_agent*"]
[tool.ruff]
target-version = "py310"
line-length = 120
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.mypy]
python_version = "3.10"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
[[tool.mypy.overrides]]
module = [
"langchain.*",
"langchain_openai.*",
"langchain_core.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
minversion = "7.0"
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
"--cov=agent_runtimes.langchain_agent",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
[tool.coverage.run]
source = ["agent_runtimes.langchain_agent"]
omit = [
"*/tests/*",
"*/test_*",
"*/__pycache__/*",
"*/.*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
[tool.bandit]
exclude_dirs = ["tests"]
skips = ["B101", "B601"]
[tool.isort]
profile = "black"
line_length = 120
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true