Skip to main content

Authenticated MCP server for Teamcenter Knowledge Base APIs

Project description

Teamcenter MCP Server

A complete solution for integrating AI assistants with Teamcenter Knowledge Base APIs. Includes both a mock API server for development and a deployable MCP server for production use.

What You Get

  • Mock API Server: Test server that simulates Teamcenter Knowledge Base responses
  • MCP Server: Production-ready server that connects AI assistants to Teamcenter APIs
  • Universal Deployment: Works across all IDEs and platforms via UVX

Quick Start

1. Install UV (if not already installed)

curl -LsSf https://astral.sh/uv/install.sh | sh

2. Clone and Start Mock API Server

# Start the mock API server (for development/testing)
uv run uvicorn main:app --reload

Server runs on http://127.0.0.1:8000

3. Build MCP Server Package

# Build the deployable MCP server
uv build

Creates: dist/teamcenter_mcp_server-0.1.0-py3-none-any.whl

4. Validate Your Setup

# Run the deployment validation test
python test_mcp_contract.py

This validates that your UVX wheel deployment is ready for IDE integration.

Deployment Options

Option 1: UVX (Recommended - Universal)

Use the built wheel package anywhere:

# From the built wheel (works on any machine)
uvx --from dist/teamcenter_mcp_server-0.1.0-py3-none-any.whl teamcenter-mcp-server --base-url http://localhost:8000

Why UVX is better:

  • No virtual environment conflicts (Windows/WSL compatible)
  • Works anywhere (just copy the .whl file)
  • No installation required (isolated execution)

Option 2: Direct Python (Development Only)

Run directly from source:

# For development/testing only
uv run python auth_mcp_stdio.py --base-url http://localhost:8000

IDE Integration

VS Code

Update .vscode/mcp.json:

{
  "servers": {
    "teamcenter": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "dist/teamcenter_mcp_server-0.1.0-py3-none-any.whl", "teamcenter-mcp-server", "--base-url", "http://localhost:8000"]
    }
  }
}

Continue.dev

Update ~/.continue/config.json:

{
  "experimental": {
    "modelContextProtocolServers": [{
      "transport": {
        "type": "stdio",
        "command": "uvx",
        "args": ["--from", "dist/teamcenter_mcp_server-0.1.0-py3-none-any.whl", "teamcenter-mcp-server", "--base-url", "http://localhost:8000"]
      }
    }]
  }
}

JetBrains IDEs

Add to ~/.mcp.json:

{
  "mcpServers": {
    "teamcenter": {
      "command": "uvx",
      "args": ["--from", "dist/teamcenter_mcp_server-0.1.0-py3-none-any.whl", "teamcenter-mcp-server", "--base-url", "http://localhost:8000"]
    }
  }
}

Testing

Run All Tests

uv run pytest tests/ -v

Validate Setup

# Pre-flight check - run this before configuring IDEs
python test_mcp_contract.py

What this tests:

  • ✅ UVX wheel package works
  • ✅ MCP server initializes correctly
  • ✅ Command-line arguments work
  • ✅ API server connectivity (optional)

Run this whenever you:

  • Build a new wheel (uv build)
  • Change server configurations
  • Set up on a new machine

🚀 Production Deployment

Ready to connect to your real Teamcenter API? Replace the mock server with your production endpoint:

Replace Mock URL with Production

# Instead of: --base-url http://localhost:8000
# Use your real Teamcenter API:
--base-url https://teamcenter.yourcompany.com

Update IDE Configurations

VS Code (.vscode/mcp.json):

"args": ["--from", "dist/teamcenter_mcp_server-0.1.0-py3-none-any.whl", "teamcenter-mcp-server", "--base-url", "https://teamcenter.yourcompany.com"]

Continue.dev (~/.continue/config.json):

"args": ["--from", "dist/teamcenter_mcp_server-0.1.0-py3-none-any.whl", "teamcenter-mcp-server", "--base-url", "https://teamcenter.yourcompany.com"]

Alternative: Environment Variable

# Set once, works everywhere
export TEAMCENTER_API_URL=https://teamcenter.yourcompany.com

# Then use without --base-url:
"args": ["--from", "dist/teamcenter_mcp_server-0.1.0-py3-none-any.whl", "teamcenter-mcp-server"]

🎯 That's it! No mock server needed - connect directly to production.

Usage Examples

Once configured, ask your AI assistant:

  • @MCP check if the Teamcenter knowledge base is healthy
  • @MCP search for PLM workflow integration documentation
  • @MCP find CAD model versioning guides

Files Overview

  • auth_mcp_stdio.py: Main MCP server (single file solution)
  • main.py: Mock API server for development
  • test_mcp_contract.py: Deployment validation script
  • pyproject.toml: Package configuration for uv build
  • dist/: Built wheel packages (created by uv build)

Key Commands

Command Purpose
uv run uvicorn main:app --reload Start mock API server
uv build Build MCP server package
python test_mcp_contract.py Validate setup (run first!)
uv run pytest tests/ -v Run all tests

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

teamcenter_mcp_server_test-0.1.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

teamcenter_mcp_server_test-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file teamcenter_mcp_server_test-0.1.0.tar.gz.

File metadata

File hashes

Hashes for teamcenter_mcp_server_test-0.1.0.tar.gz
Algorithm Hash digest
SHA256 846fb55d8df9540360fa763e32faf7ac194e6775e4a4080dce33e1a5002bf4cb
MD5 da618703eb79270cbb5a369169c826e1
BLAKE2b-256 5dcb0f5c29c0278d6f4c9589ce2afce2e6c48006b4872c0f76004de92b826986

See more details on using hashes here.

File details

Details for the file teamcenter_mcp_server_test-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for teamcenter_mcp_server_test-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 554e532768ae19741d672cc7d484ce2a14394dc6d3bb2f87d75c451246a26393
MD5 8c514c078d064ecbe5508e0f854281fc
BLAKE2b-256 f098c8bb1a79ac8f482acae10bfc21e34046f3f5518a30fa1f54729ed5a01287

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