Visual Studio Code, Cline and MCP servers

AI-powered development workflow

Xin Cheng
5 min readMar 16, 2025

We discussed MCP, which provides LLM with external knowledge in standard way. This article talks about initial experiment of MCP in software development. Use cases for software development.

Suppose that as a developer, you need to start a new project with uses new technology and external system you are not familiar with. Here are typical steps you arrive at a quick PoC.

  1. Understand the technology. You may need to learn SQL (TSQL, PLSQL, etc.), Python, .NET
  2. Understand the system, e.g. API, schema, you need to go through different systems, e.g. confluence page for documentation, that system UI, consult some people
  3. Find some sample code and do trial and error until it runs.

Suppose IDE can help you streamline this cycle, it not only understands the context (e.g. codebase), but also understands specific system API, schema, how to interact to quickly come up with prototype. Today, let’s use a sample sqlite database to understand this flow.

Prerequisites

Python, uv (new Python package manager)

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

Setup MCP server locally

Because servers are locally run, MCP currently only supports desktop hosts. Remote hosts are in active development.

In Cline, you can go to MCP Servers marketplace and find sqlite to install.

Although Cline claims they take care of everything about configuration, I struggle with it.

Final manual resolution

  1. Git clone MCP servers code to have sqlite MCP servers
  2. Add configuration and change path of sqlite MCP and test sqlite database
  3. Use sample sqlite database
# Add the server to your claude_desktop_config.json
"mcpServers": {
"sqlite": {
"command": "uv",
"args": [
"--directory",
"parent_of_servers_repo/servers/src/sqlite",
"run",
"mcp-server-sqlite",
"--db-path",
"~/chinook.db"
]
}
}

Remember to restart VSCode to let it take effect. If it is working, you can see green light for sqlite MCP server in MCP servers in Cline.

Development workflow

Understand system

Data

list tables

show me tables in sqlite database

result

Cline wants to use a tool on the sqlite MCP server:
list_tables
List all tables in the SQLite database

Response
[{'name': 'albums'}, {'name': 'sqlite_sequence'}, {'name': 'artists'}, {'name': 'customers'}, {'name': 'employees'}, {'name': 'genres'}, {'name': 'invoices'}, {'name': 'invoice_items'}, {'name': 'media_types'}, {'name': 'playlists'}, {'name': 'playlist_track'}, {'name': 'tracks'}, {'name': 'sqlite_stat1'}]

Checkpoint
Compare
Restore


The following tables are present in the SQLite database:

albums
sqlite_sequence
artists
customers
employees
genres
invoices
invoice_items
media_types
playlists
playlist_track
tracks
sqlite_stat1
The list of tables has been successfully retrieved.

Schema

I want to develop program that can return top 5 artists and their albums

check table schema

show me table schemas for albums and artists tables

result

Cline wants to use a tool on the sqlite MCP server:
describe_table
Get the schema information for a specific table
Arguments
{
"table_name": "albums"
}

Response
[{'cid': 0, 'name': 'AlbumId', 'type': 'INTEGER', 'notnull': 1, 'dflt_value': None, 'pk': 1}, {'cid': 1, 'name': 'Title', 'type': 'NVARCHAR(160)', 'notnull': 1, 'dflt_value': None, 'pk': 0}, {'cid': 2, 'name': 'ArtistId', 'type': 'INTEGER', 'notnull': 1, 'dflt_value': None, 'pk': 0}]

Checkpoint
Compare
Restore


Cline wants to use a tool on the sqlite MCP server:
describe_table
Get the schema information for a specific table
Arguments
{
"table_name": "artists"
}

Response
[{'cid': 0, 'name': 'ArtistId', 'type': 'INTEGER', 'notnull': 1, 'dflt_value': None, 'pk': 1}, {'cid': 1, 'name': 'Name', 'type': 'NVARCHAR(120)', 'notnull': 0, 'dflt_value': None, 'pk': 0}]

Checkpoint
Compare
Restore


The schemas for the requested tables are as follows:

Albums Table Schema
AlbumId: INTEGER, Not Null, Primary Key
Title: NVARCHAR(160), Not Null
ArtistId: INTEGER, Not Null
Artists Table Schema
ArtistId: INTEGER, Not Null, Primary Key
Name: NVARCHAR(120), Nullable
The schemas have been successfully retrieved.

Quick prototype

create python file

create python file that list top 5 artists and also the albums for those top 5 artists

result

import sqlite3

def get_top_artists_with_albums(db_path):
# Connect to the SQLite database
conn = sqlite3.connect(db_path)
cursor = conn.cursor()

# Query to get the top 5 artists based on the number of albums
query = '''
SELECT artists.ArtistId, artists.Name, COUNT(albums.AlbumId) AS AlbumCount
FROM artists
LEFT JOIN albums ON artists.ArtistId = albums.ArtistId
GROUP BY artists.ArtistId
ORDER BY AlbumCount DESC
LIMIT 5;
'''

cursor.execute(query)
top_artists = cursor.fetchall()

# Print the top artists and their albums
for artist in top_artists:
artist_id, artist_name, _ = artist
print(f'Artist: {artist_name} (ID: {artist_id})')

# Query to get albums for the current artist
album_query = '''
SELECT Title FROM albums WHERE ArtistId = ?;
'''
cursor.execute(album_query, (artist_id,))
albums = cursor.fetchall()

if albums:
print(' Albums:')
for album in albums:
print(f' - {album[0]}')
else:
print(' No albums found.')

# Close the database connection
conn.close()

if __name__ == "__main__":
db_path = 'rag_azure_search/data/chinook.db' # Update the path as necessary
get_top_artists_with_albums(db_path)

Execution result

Artist: Iron Maiden (ID: 90)
Albums:
- A Matter of Life and Death
- A Real Dead One
- A Real Live One
- Brave New World
- Dance Of Death
- Fear Of The Dark
- Iron Maiden
- Killers
- Live After Death
- Live At Donington 1992 (Disc 1)
- Live At Donington 1992 (Disc 2)
- No Prayer For The Dying
- Piece Of Mind
- Powerslave
- Rock In Rio [CD1]
- Rock In Rio [CD2]
- Seventh Son of a Seventh Son
- Somewhere in Time
- The Number of The Beast
- The X Factor
- Virtual XI
Artist: Led Zeppelin (ID: 22)
Albums:
- BBC Sessions [Disc 1] [Live]
- Physical Graffiti [Disc 1]
- BBC Sessions [Disc 2] [Live]
- Coda
- Houses Of The Holy
- In Through The Out Door
- IV
- Led Zeppelin I
- Led Zeppelin II
- Led Zeppelin III
- Physical Graffiti [Disc 2]
- Presence
- The Song Remains The Same (Disc 1)
- The Song Remains The Same (Disc 2)
Artist: Deep Purple (ID: 58)
Albums:
- MK III The Final Concerts [Disc 1]
- The Final Concerts (Disc 2)
- Come Taste The Band
- Deep Purple In Rock
- Fireball
- Knocking at Your Back Door: The Best Of Deep Purple in the 80's
- Machine Head
- Purpendicular
- Slaves And Masters
- Stormbringer
- The Battle Rages On
Artist: Metallica (ID: 50)
Albums:
- Garage Inc. (Disc 1)
- Black Album
- Garage Inc. (Disc 2)
- Kill 'Em All
- Load
- Master Of Puppets
- ReLoad
- Ride The Lightning
- St. Anger
- ...And Justice For All
Artist: U2 (ID: 150)
Albums:
- Achtung Baby
- All That You Can't Leave Behind
- B-Sides 1980-1990
- How To Dismantle An Atomic Bomb
- Pop
- Rattle And Hum
- The Best Of 1980-1990
- War
- Zooropa
- Instant Karma: The Amnesty International Campaign to Save Darfur

Appendix

https://scottspence.com/posts/using-mcp-tools-with-claude-and-cline

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Xin Cheng
Xin Cheng

Written by Xin Cheng

Generative Agentic AI/LLM, Data, ML, Multi/Hybrid-cloud, cloud-native, IoT developer/architect, 3x Azure-certified, 3x AWS-certified, 2x GCP-certified

No responses yet

Write a response