Get the FREE Ultimate OpenClaw Setup Guide →

model-context-protocol -hands-on-with-agentic-ai-2034200

This is a code repository for the LinkedIn Learning course Model Context Protocol (MCP): Hands-On with Agentic AI [ASI] [TEXT] [MODELS]

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio linkedinlearning-model-context-protocol-mcp-hands-on-with-agentic-ai-2034200 python -m text_assist \
  --env MCP_LOG_LEVEL="info" \
  --env OPENAI_API_KEY="your-api-key"

How to use

This MCP repository provides hands-on examples of adding agentic capabilities to language models through the Model Context Protocol (MCP). The included servers demonstrate Python and TypeScript implementations that expose resources (data), tools (actions), and prompts (instructions) so an LLM can perform multi-step tasks and integrate with external data sources. The Python server example (text-assist) shows basic text processing tools like counting characters or words, while the TypeScript example (projectDocumenter) showcases more complex workflows such as summarizing a project and generating comprehensive README documents. You can test these servers with the MCP Inspector, Claude Desktop, or Cursor to see how the LLM retrieves data, invokes tools, and refines prompts via MCP-compliant interactions.

How to install

Prerequisites:

  • Python 3.9+ or higher
  • Node.js 14+ (for TypeScript MCP server)
  • Git
  • Access to an OpenAI-compatible API (or other MCP-compatible LLM provider)

Installation steps:

  1. Clone the repository: git clone <repository-url> cd <repo-root>

  2. Install Python MCP server dependencies (text-assist):

    • Navigate to the Python example folder, e.g. mcp-server-examples/text-assist
    • Create and activate a virtual environment: python -m venv venv source venv/bin/activate # macOS/Linux venv\Scripts\activate.bat # Windows
    • Install required packages (adjust requirements.txt as needed): pip install -r requirements.txt
  3. Install TypeScript MCP server dependencies (projectDocumenter):

    • Navigate to the TypeScript example folder, e.g. mcp-server-examples/projectDocumenter
    • Install dependencies: npm install
  4. Run the servers in development mode (examples shown):

    • Python text-assist: python -m text_assist
    • TypeScript projectDocumenter: npm run build node dist/server.js
  5. Set your environment variables (recommended):

    • OPENAI_API_KEY: your API key for the LLM
    • MCP_LOG_LEVEL: info or debug for troubleshooting

Notes:

  • Ensure network access to required data sources if your MCP server queries external APIs.
  • If using the MCP Inspector, connect to localhost ports exposed by the servers as configured in your environment.
  • The exact module names and entry points may vary slightly depending on the template or SDK version used; adjust the -m module_name or server.js paths accordingly.

Additional notes

Tips and common issues:

  • Ensure Python virtual environments are activated when running Python MCP servers to avoid dependency conflicts.
  • For TypeScript servers, run the build step before starting the server to ensure dist/server.js exists.
  • If you see TLS/SSL or network errors when calling external APIs, verify your environment firewall/proxy settings.
  • Use the MCP Inspector to test resources, tools, and prompts in a controlled environment before integrating with Claude Desktop or Cursor.
  • Environment variables: consider adding MC P_BASE_URL, API keys, and debugging flags to help diagnose issues quickly.
  • If a server fails to start, check the log level (MCP_LOG_LEVEL) and review any module import errors in the console output.

Related MCP Servers

Sponsor this space

Reach thousands of developers