How to get the coordinates of the knife tool on an edge (in real time)?
instead of getting the coordinates of the knife tool you can get the mouse coordinates in the 3d space " since they are the same position " as CoDEmanX stated : they are not the same position. Knife tool snaps to edges and vertices and is thus not always at mouse location

all the steps needed for this are in the template script  "operator_modal_view3d_raycast.py" in blender , what it does is : cast a ray from the view and find the nearest intersection point with the visible objects , the position of the mouse in the 3d view is the Hit output from the obj_ray_cast() 

here is the bare code after some elimination of unnecessary lines :

import bpy
from bpy_extras import view3d_utils

def main(context, event, ray_max=1000.0):

    # get the context arguments
    scene = context.scene
    region = context.region
    rv3d = context.region_data
    coord = event.mouse_region_x, event.mouse_region_y

    # get the ray from the viewport and mouse
    view_vector = view3d_utils.region_2d_to_vector_3d(region, rv3d, coord)
    ray_origin = view3d_utils.region_2d_to_origin_3d(region, rv3d, coord)

    if rv3d.view_perspective == 'ORTHO':
        # move ortho origin back
        ray_origin = ray_origin - (view_vector * (ray_max / 2.0))

    ray_target = ray_origin + (view_vector * ray_max)

    def obj_ray_cast(obj, matrix):
        """Wrapper for ray casting that moves the ray into object space"""

        # get the ray relative to the object
        matrix_inv = matrix.inverted()
        ray_origin_obj = matrix_inv * ray_origin
        ray_target_obj = matrix_inv * ray_target

        # cast the ray
        hit, normal, face_index = obj.ray_cast(ray_origin_obj, ray_target_obj)

        if face_index != -1:
            return hit, normal, face_index
        else:
            return None, None, None

    # no need to loop through other objects since we are interested in the active object only
    obj = context.scene.objects.active
    matrix = obj.matrix_world.copy()
    if obj.type == 'MESH':
        hit, normal, face_index = obj_ray_cast(obj, matrix)
        if hit is not None:
            hit_world = matrix * hit
            return hit_world

    return None